Skip to content

Commit c350e81

Browse files
Do-While Loop
1 parent 4fd71f1 commit c350e81

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
public class cwh_22_ch4_do_while {
2+
public static void main(String[] args) {
3+
// int a = 0;
4+
// while(a<5){
5+
// System.out.println(a);
6+
// a++;
7+
// }
8+
int b = 10;
9+
do {
10+
System.out.println(b);
11+
b++;
12+
}while(b<5);
13+
14+
int c = 1;
15+
do{
16+
System.out.println(c);
17+
c++;
18+
}while(c<=45);
19+
20+
}
21+
}

0 commit comments

Comments
 (0)