-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNestedForLoop.java
More file actions
31 lines (25 loc) · 857 Bytes
/
NestedForLoop.java
File metadata and controls
31 lines (25 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Teacher 1 : Asked you tho write the word pen 5 times on the board
// Teacher 2 : Asked you tho write the word pen 5 times on the board
class NestedForLoop {
public static void main(String[] args) {
for(int Teacher = 1 ; Teacher<=3; Teacher= Teacher+1){
for(int count = 1; count<=5; count=count+1){
//System.out.println("Pen");
}
}
// Pettern types
for(int j=1; j<=3 ; j=j+1){
for(int i=1; i<=3; i=i+1){
// System.out.println("*");
// System.out.println();
}
}
// Pettern types II
for(int j=1; j<=3; j=j+1)
{
for(int i=1; i<=3; i=i+1)
System.out.println("x");
}
System.out.println();
}
}