Dear students, As part of your computer project you have to write 3 programs each from decision making chapter using if condition, if else if, switch statement and 3 programs from iteration one from for loop, one from while loop and one from do while loop
Answers
Answered by
0
Answer:
//for loop for(int i=1;i<=10;i++){ System.out.println(i); }
//while loop int i=1; while(i<=10){ System.out.println(i); i++; }
public static void main(String[] args) {
int i=1;
do{
System.out.println(i);
i++;
}while(i<=10);
}
}
Similar questions