0
I tried this code : int num = 1; int number; while (num <= 5) { cin >> number; num++; }. But it showed no output
7 Respostas
+ 3
You didnt print anything
+ 2
You have to print something if you want an output.
+ 1
but, if you execute that piece of code, 'number' will only contain the value of the last input, as you are rewriting its value each time you input something.
+ 1
what do you want the number input for?
0
can you explain with example
0
I have understood to execute an output I need to write a cout<<num