1. 1 6 11
2 7 12
3 8 13
4 9 14
5 10 15
2. 1 2
3 4 5
6 7
8 9
10 11
12
13 14
15
3. 1
2 6
3 7
10
4 8
11 13
5 9
12 14 15
4. 1
2 3
4 5
6
7 8
9 10
11 12
13 14 15
1. N ← 1
for i ← 1
to 5 do
for
j ← 1 to 3 do
write (N, " ")
N ← N + 5
endfor
writeln
endfor
2. N ← 1
for i ← 1
to 5 do
for
j ← 1 to (6 - i) do
write (N, " ")
N ← N + 1
endfor
writeln
endfor
3. N ← 1
for i
← 1 to 5 do
N ← 1
for
j ← 1 to (1 + i) do
write (N, " ")
N ← N + (5 - j)
endfor
writeln
endfor
4. N ← 1
for i
← 1 to 5 do
for
j ← 1 to
i do
write (N, " ")
N ← N + 1
writeln
endfor
writeln
endfor
0 komentar:
Posting Komentar