- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.java
More file actions
Latest commit
66 lines (47 loc) · 811 Bytes
/
Copy pathloop.java
File metadata and controls
66 lines (47 loc) · 811 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
publicclassMain
{
publicstaticvoidmain(String[] args)
{
System.out.println("loop 1");
inti1 = 3;
intn1 = 20;
while(i1 < n1)
{
System.out.println(i1);
i1 = i1 + 4;
}
System.out.println("loop 2");
inti2 = 8;
intn2 = 257;
while(i2 < n2)
{
System.out.println(i2);
i2 = i2 * 2;
}
System.out.println("loop 3");
inti3 = 243;
intn3 = 2;
while(i3 > n3)
{
System.out.println(i3);
i3 = i3 / 3;
}
System.out.println("loop 4");
inti4 = 3;
intn4 = -4;
while(i4 > n4)
{
System.out.println(i4);
i4--;
}
System.out.println("loop 5");
inti5 = 0;
while(i5 < 2)
{
System.out.print("1");
System.out.print("0");
i5++;
}
System.out.print("1");
}
}