×
Language:

Tentukan output dari masing-masingprogram berikut!
1:Output
1
Writeln(‘Anjing kucing kudasapi.’);
2
Kalimat:=’Kuda pipis.’;
3
Writeln(Kalimat);
2:Output
4
KataA:=’Anjing’;
5
KataB:=’Gila’;
6
Writeln(KataA, KataB);
3:Output
7
KataA:=’Anjing’;
8
KataB:=’Gila’;
9
Writeln(KataA, ‘ ‘, KataB);
4:Output
10
KataA:=’Kucing’;
11
KataB:=’Tikus’;
12
Frasa:=KataA + ‘&‘ + KataB;
13
Writeln(KataB);
5:Output
14
KataA:=’Kucing’;
15
KataB:=’Tikus’;
16
Frasa:=KataA + ‘&‘ + KataB;
17
Writeln(Frasa);
6:If
18
B:=True;
19
if B then
20
writeln(‘Ngak’)
21
else
22
Writeln(‘Bruz’);
7:If
23
A:=’Bababa’;
24
if A=’bababa’ then
25
writeln(‘Ngak’)
26
else
27
Writeln(‘Bruz’);
8:If
28
A:=5;
29
if A<3 then
30
writeln(‘Ngak’)
31
Else
32
If A<7 then
33
Writeln(‘Bruz’)
34
Else
35
If A<10 then
36
Writeln(‘Nyuu’)
37
Else
38
Writeln(‘Haa’);
9:For & i
39
N:=12;
40
for p:=0 to N do
41
begin
42
if p mod 3=0 then
43
write(‘b’)
44
else
45
write(‘u’);
46
end;
10:For & i
47
N:=12;
48
for p:=0 to N do
49
begin
50
if p mod 3=0 then
51
write(‘b’)
52
else
53
if p mod 3=1 then
54
write(‘u’);
55
end;
11:For & i
56
N:=12;
57
for p:=0 to N do
58
begin
59
if p mod 3=0 then
60
write(‘b’)
61
else
62
if p mod 3=2 then
63
write(‘u’)
64
else
65
write(‘a’);
66
end;
12:For & i
67
N:=12;
68
for p:=0 to N do
69
begin
70
if p mod 3=3 then
71
write(‘b’)
72
else
73
if p mod 3=2 then
74
write(‘u’)
75
else
76
write(‘a’);
77
end;

13:For & i
78
N:=12;
79
m:=0;
8081
for p:=0 to N do
82
begin
83
if p mod 3=0 then
84
m:=m+2;
85
end;
86
writeln(m);
14:For & i
87
N:=12;
88
m:=0;
8990
for p:=0 to N do
91
begin
92
if p mod 3=0 then
93
m:=m+2
94
else
95
m:=m-3;
96
end;
97
writeln(m);
15:For & i
98
N:=12;
99
m:=0;
100101
for p:=0 to N do
102
begin
103
if p mod 3=0 then
104
m:=m+2
105
else
106
if p mod 3=1 then
107
m:=m-3;
108
end;
109
writeln(m);
16:For & i
110
N:=12;
111
m:=0;
112113
for p:=0 to N do
114
begin
115
if p mod 3=0 then
116
m:=m+2
117
else
118
if p mod 3=1 then
119
m:=m-3
120
else
121
m:=-m;
122
end;
123
writeln(m);
17:For & i
124
N:=12;
125
m:=0;
126127
for p:=0 to N do
128
begin
129
if p mod 3=3 then
130
m:=m+1
131
end;
132
writeln(m);
18:For & array
133
N:=12
134135
for p:=0 to N do
136
A[p]:=N-p;
137138
for p:=0 to N do
139
writeln(A[p]);
19:For & array
140
N:=12
141142
for p:=0 to N do
143
begin
144
A[p]:=p;
145
end;
146

147
for p:=0 to N do
148
begin
149
writeln(A[N-p]);
150
end;
20:For & array
151
N:=12
152
A[0]:=8;
153154
for p:=1 to N do
155
A[p]:=A[p-1];
156157
for p:=0 to N do
158
write(A[p]);
21:For & array
159
N:=12
160
A[0]:=1;

161162
for p:=1 to N do
163
A[p]:=A[p-1] * 2;
164165
for p:=0 to N do
166
write(A[p]);
22:For & array
167
N:=12
168
A[0]:=2;
169170
for p:=1 to N do
171
A[p]:=p * A[p-1];
172173
for p:=0 to N do
174
write(A[p]);
23:For & array
175
N:=12
176
A[0]:=2;
177178
for p:=1 to N do
179
A[p]:=p * A[p-1];
180181
Jumlah:=0;
182
for p:=1 to N do
183
Jumlah:=Jumlah + A[p];
184185
for p:=0 to N do
186
write(A[p]);
24:For & array
187
N:=12
188
A[0]:=2;
189190
for p:=1 to N do
191
A[p]:=p * A[p-1];
192193
Jumlah:=0;
194
for p:=1 to N do
195
Jumlah:=Jumlah + A[p];
196197
for p:=0 to N do
198
write(A[p]);
199200
writeln(Jumlah);
25:For & array
201
N:=12
202
A[0]:=2;
203204
for p:=1 to N do
205
A[p]:=p * A[p-1];
206207
Jumlah:=0;
208
for p:=1 to N do
209
Jumlah:=Jumlah + A[p];
210211
for p:=0 to N do
212
begin
213
write(A[p]);
214
if p=N then
215
write(‘ = ’)
216
else
217
write(‘ + ’);
218
end;
219220
writeln(Jumlah);
A[1]:=5;A[2]:=8;A[3]:=11;A[4]:=12;A[5]:=6;A[6]:=3;
26:For & array
221
N:=6;
222
Jumlah:=0;
223

224
for i:=1 to N do
225
Jumlah:=Jumlah + A[i];
226

227
write(‘Jumlah = ‘);
228
writeln(Jumlah);
27:For & array
229
N:=6;
230
Jumlah:=10;
231

232
for i:=1 to N do
233
Jumlah:=Jumlah + A[i];
234

235
write(‘Jumlah = ‘);
236
writeln(Jumlah);
28:For & array
237
N:=6;
Search History:
Searching...
Result 00 of 00
00 results for result for
• p.
• Notes