-
Notifications
You must be signed in to change notification settings - Fork 0
/
perhitungan3.java
40 lines (35 loc) · 1.01 KB
/
perhitungan3.java
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
32
33
34
35
36
37
38
39
40
public class perhitungan3 {
public static void main(String[] args) {
int a = 1;
int b = 20;
for (int i = 0; i < 1; i++) {
for (int j = 0; j < 5; j++) {
System.out.print(a + " ");
a++;
}
System.out.println();
}
for (int i = 0; i < 1; i++) {
for (int j = 0; j < 5; j++) {
System.out.print(b + " ");
b--;
}
System.out.println();
}
for (int i = 0; i < 1; i++) {
for (int j = 0; j < 5; j++) {
System.out.print(a + " ");
a++;
}
System.out.println();
}
for (int i = 0; i < 1; i++) {
for (int j = 0; j < 5; j++) {
System.out.print(b + " ");
b--;
}
System.out.println();
}
System.out.println("==========");
}
}