• We need your support!

    We are currently struggling to cover the operational costs of Xtremepapers, as a result we might have to shut this website down. Please donate if we have helped you and help make a difference in other students' lives!
    Click here to Donate Now (View Announcement)

C++ ?

Messages
657
Reaction score
1,447
Points
143
for (int i = 1; i <= 5; i++)
{
// Write your loop code here.
}

"int i = 1" - Initialization of Iteration variable/ count variable
"i <= 5" - Loop condition/comparison. It's basically a true false. You can also place method call there.
"i++" - Increment (By 1), i-- decrement by 1
 
Messages
4,493
Reaction score
15,418
Points
523
for (int i = 1; i <= 5; i++)
{
// Write your loop code here.
}

"int i = 1" - Initialization of Iteration variable/ count variable
"i <= 5" - Loop condition/comparison. It's basically a true false. You can also place method call there.
"i++" - Increment (By 1), i-- decrement by 1
convo
 
Messages
4,493
Reaction score
15,418
Points
523
for (int i = 1; i <= 5; i++)
{
// Write your loop code here.
}

"int i = 1" - Initialization of Iteration variable/ count variable
"i <= 5" - Loop condition/comparison. It's basically a true false. You can also place method call there.
"i++" - Increment (By 1), i-- decrement by 1
i get you... but
 
Messages
657
Reaction score
1,447
Points
143
http://www.eskimo.com/~scs/cclass/notes/sx3e.html
y is he giving these commands again n again?
expr<sub>1</sub>
expr<sub>2</sub>
statement
expr<sub>3</sub>
expr<sub>2</sub>
statement
expr<sub>3</sub>

...
expr<sub>2</sub>
statement
expr<sub>3</sub>
expr<sub>2</sub>
This is runtime. This is how instructions are being processed by compiler.

Compiler checks
expr<sub>1</sub> if true or meets condition then move onto

expr<sub>2</sub> if true or meets condition then move onto
statement
 
Messages
4,493
Reaction score
15,418
Points
523
This is runtime. This is how instructions are being processed by compiler.

Compiler checks
expr<sub>1</sub> if true or meets condition then move onto

expr<sub>2</sub> if true or meets condition then move onto
statement
thanks there . id remember u in ur prayers and u too plz rememb me
 
Messages
4,493
Reaction score
15,418
Points
523
This is runtime. This is how instructions are being processed by compiler.

Compiler checks
expr<sub>1</sub> if true or meets condition then move onto

expr<sub>2</sub> if true or meets condition then move onto
statement
only diference btw for and while loop is that there 2 eqn in while while three in for ryt?.
 
Top