Skip to main content

Question 1

Question 1

by AISYAH SUHAILLA BINTI JILI -
Number of replies: 21

In most programming languages, a loop is consists of three components: initialization, condition, and increment/decrement.  Explain more about these THREE (3) loop components.

In reply to AISYAH SUHAILLA BINTI JILI

Re: Question 1

by MUHAMMAD FAKRUL RIDWAN BIN BAHARUDDIN -
1. Initialization - to initialize the starting point for the loop.
2. Evaluation - To make a condition for the loop to make decision if the loop should keep going or stop.
3. increment/decrement - updates the loop control variable after each iteration
In reply to AISYAH SUHAILLA BINTI JILI

Re: Question 1

by SURA ANAK DANA -
1. Initialization - to initialize the starting point for the loop.
2. Evaluation - to make a condition for the loop to make decision if the loop should keep going or stop.
3. Increment/Decrement - updates the loop control variable after each iteration
In reply to AISYAH SUHAILLA BINTI JILI

Re: Question 1

by MAXIE QUING AJONG -
1. initialization = declare the starting point of the loop
2. evaluation =determines how long the loop will run and repeat
3. increment/decrement =updates the loop variable after each iteration where increment will increase the value and decrement will decrease the value
In reply to AISYAH SUHAILLA BINTI JILI

Re: Question 1

by MUHAMMAD IZZUDDIN HAZIQ BIN JOLHI -
1. Initialization - to initialize the starting point for the loop.
2. Evaluation - To make a condition for the loop to make decision if the loop should keep going or stop.
3. increment/decrement - updates the loop control variable after each iteration
In reply to AISYAH SUHAILLA BINTI JILI

Re: Question 1

by HERDAWATI BT AHMAD -
1. Initialization - to initialize the starting point for the loop.
2. Evaluation - to make a condition for the loop to make decision if the loop should keep going or stop.
3. Increment/ Decrement - updates the loop control variable after each iteration.