+ 1
How does that works??
Please help I delete the "num ++" and it says there is "no input" isn't it supposed that: inputs with "cout"? And why can I write numbers greater than 6, if it says it stops working until the number is greater than 5 https://code.sololearn.com/cygcmIT65oOO/?ref=app
14 Answers
+ 2
What do you mean
+ 2
Firstly it's get the input from user 5 times as while loop the every round it will add the input to total and then output the total
+ 2
If there anything else you need please tell me
+ 2
You can enter any number within the integer type range because only the "num" value cannot exceed 5 but the "number" you are entering can.
+ 2
num++ is incremented at every iteration till it is equal to 5. Once it becomes greater than 5 then the while loop is terminated.
+ 2
And the compiler read like English writing from left to right if it's ++num it will increase by one first then will give value of num and if it's num++ it's will give value of num then increase it by one
For example
X=6
Y=++X //Y=7 and X =7
Y=X++ //Y=7 and X=8
+ 2
Num is for looping count
Number is for input
+ 2
Everything alright now
+ 1
I edited it, did you read it yet?
+ 1
But then, what does the "num ++" have to do??
+ 1
what is the "num ++" for
+ 1
It's increase the value of num by 1
+ 1
So "num ++" and "number" complement each other?
+ 1
Yeah i think so, thx all of you