[jawaban] Mata Pelajaran: Teknologi Informatika Kata kunci: Program Pascal • Jawaban pendek: Ppplliiss kerjain program pascal nya 1 2 3 semua ppllliisss bsk dikumpulin:(
Soal pertama: program soal_pertama; uses crt; var i, j: integer; begin for i := 1 to 5 do begin if (i mod 2 = 0) then begin for j := 1 to 5 do begin write('o '); end else begin for j := 1 to 5 do begin write('x '); end end; writeln(''); end; end. Soal kedua: program soal_kedua; uses crt; var i, j, k: integer; begin for i := 1 to 5 do begin for j := 1 to i do begin write(' ') end write('x ') for k := 1 to 4-i do begin write('o ') end writeln(''); end; end. Soal ketiga: program soal_ketiga; uses crt; var i, j: integer; begin for i := 1 to 5 do begin if (i mod 2 = 0) then begin for j := 1 to 5 do begin if (j mod 2 = 0) then begin print('x ') end else begin print('o ') end end else begin for j := 1 to 5 do begin if (j mod 2 = 0) then begin print('o ') end else begin print('x ') end end; writeln(''); end; end.
1 votes Thanks 1
ezralucio
kalo bisa, coba di run buat memastikan aja :), sebenernya aku buat algoritma di bahasa python, tapi aku konversi manual ke pascal
ezralucio
kalau kamu mau algoritma di bahasa python, bisa pm aku :)
Verified answer
[jawaban]Mata Pelajaran: Teknologi Informatika
Kata kunci: Program Pascal
• Jawaban pendek:
Ppplliiss kerjain program pascal nya 1 2 3 semua ppllliisss bsk dikumpulin:(
Soal pertama:
program soal_pertama;
uses crt;
var
i, j: integer;
begin
for i := 1 to 5 do
begin
if (i mod 2 = 0) then
begin
for j := 1 to 5 do
begin
write('o ');
end
else
begin
for j := 1 to 5 do
begin
write('x ');
end
end;
writeln('');
end;
end.
Soal kedua:
program soal_kedua;
uses crt;
var
i, j, k: integer;
begin
for i := 1 to 5 do
begin
for j := 1 to i do
begin
write(' ')
end
write('x ')
for k := 1 to 4-i do
begin
write('o ')
end
writeln('');
end;
end.
Soal ketiga:
program soal_ketiga;
uses crt;
var
i, j: integer;
begin
for i := 1 to 5 do
begin
if (i mod 2 = 0) then
begin
for j := 1 to 5 do
begin
if (j mod 2 = 0) then
begin
print('x ')
end
else
begin
print('o ')
end
end
else
begin
for j := 1 to 5 do
begin
if (j mod 2 = 0) then
begin
print('o ')
end
else
begin
print('x ')
end
end;
writeln('');
end;
end.