0

Why would you want to input more than one variable in the same line?

10th Jul 2016, 10:09 PM
Thomas Leak
Thomas Leak - avatar
2 Answers
+ 1
if you have many variable that needs input like to adds two number. int a, b,sum; cin >> a >>b; sum = a + b; cout <<sum;
12th Jul 2016, 9:03 AM
Sunusi Muhammad Raji
Sunusi Muhammad Raji - avatar
0
@sunusi When the above code will run it will first ask the value of a and then the value of b and then will print their sum.
12th Jul 2016, 2:49 PM
Sujay
Sujay - avatar