0
What is increment and loops
4 Respostas
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".
0
Thanks
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)
0
np