How to print starting 3 array digits of a 5 digit array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to print starting 3 array digits of a 5 digit array

I want to print the starting array of the array you wanted

13th Nov 2017, 12:05 PM
Harshit Singh
Harshit Singh - avatar
1 Answer
+ 8
Which Language? In C++, you do : for(int i=0;i<3;i++) cout<<arr[i]<<(i==3)?"\n":",";
13th Nov 2017, 12:07 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar