+ 1
How to chain ore than 1 input in singke statement ??
3 odpowiedzi
+ 1
cin >> a >> b;
User can enter inputs one line at a time (input, enter, input, enter), or they can enter inputs all on one line (separated by spaces).
0
Ex: cin<<x<<y<<z;
Above example takes 3 inputs, in the same way, you can give as many inputs as you want in a single statement.
0
you better specify to user in your code that you expect him to input 3 times one after another before he hits enter key otherwise you might get an error if he inputs just one time and hits enter 😊, just saying 😊