Professional Documents
Culture Documents
Module 2
Module 2
Task 1
1. Create a flowchart on the conditional statement given on the program code on IF-ELSE
Activity. Show the Final Output of the Code.
Final Output:
Task 2
1. Examples and Scenario to be given must be appropriate on each Loop.
1. FOR LOOP
3. WHILE LOOP
int i=1;
while(i<=5){
System.out.println(i);
i++;
}
4. DO WHILE LOOP
int i=1;
do{
System.out.println(i);
i++;
}while(i<=10);
Task 3
The continue statement will re-evaluate the condition immediately and restart the loop without
running the code after the continue statement.
package com.ntc.inputs;
import java.util.Scanner;
SAMPLE OUTPUT: