forked from AllenDowney/ThinkJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFor.java
More file actions
17 lines (16 loc) · 377 Bytes
/
For.java
File metadata and controls
17 lines (16 loc) · 377 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class For
{
public static void main(String[] args)
{
int num = 0;
for (int i = 1; i < 4; i++)
{
System.out.println("Outer Loop i=" + i);
}
for (int j = 1; j < 4; j++)
{
System.out.print("\tInner Loop j =" + j);
System.out.println("\t\tTotal num=" + (++num));
}
}
}