0

What is increment and loops

20th Nov 2016, 9:59 AM
shubh karia
shubh karia - avatar
4 ответов
0
Loops stop when the condition is false. Example: int i=3 if (i<5) { cout<<"Yes"; } else { cout<<"No"; } If i is less than 5 then put out "Yes". If i is bigger than 5 then put out "No".
20th Nov 2016, 10:32 AM
TheLastCookie
TheLastCookie - avatar
0
Thanks
20th Nov 2016, 10:33 AM
shubh karia
shubh karia - avatar
0
Increment Operators There are two increment operators: ++x; //prefix x++; //postfix Prefix adds 1 to a number (it is the same as x++=x+1) On Postfix changes nothing to the variable(the variable doesn't change)
20th Nov 2016, 10:40 AM
TheLastCookie
TheLastCookie - avatar
0
np
20th Nov 2016, 10:40 AM
TheLastCookie
TheLastCookie - avatar