0

Can you enter multiple values with only one cin case?

as in cin>>x; & x is more than one value

15th Mar 2017, 2:48 AM
Huda Zaher
Huda Zaher - avatar
3 ответов
0
cin >> x >> y; this takes input seperated by a space or a line break
15th Mar 2017, 2:52 AM
Nikunj Arora
Nikunj Arora - avatar
0
no like what I said cin>>x; & x is a case that can contain multiple values, just the x, no other cases
15th Mar 2017, 2:59 AM
Huda Zaher
Huda Zaher - avatar
0
if x has to get more than one value so it has to be an array and you have to make a loop to enter all the array Ex: x[5]; for(int i=0;i<5;i++) cin>>x[i];
15th Mar 2017, 4:13 AM
Gloria E. Hanna
Gloria E. Hanna - avatar