program pengerjaan dalam TURBO PASCAL Program balok, Pola Angka 0,3,6,9,12,15,18,21 dan Pola Angka 5,10,20,40,80,160,320,640
I. Program Balok
uses wincrt;
var
p,l,t,LP,V:real;
begin
writeln('program Balok');
write('Panjang:');readln(p);
write('Lebar:');readln(l);
write('Tinggi:');readln(t);
LP:=2*p*l+2*p*t+2*l*t;
V:=p*l*t;
writeln('Luas Permukaan:',LP:10:10);
writeln('Volume:',V:10:10);
end.
II. Pola Angka 0,3,6,9,12,15,18,21
uses wincrt;
var
i:real;
begin
i:=0;
while i<22 do
begin
writeln(i:2:0);
i:=i+3;
end;end.
III. Pola Angka 5,10,20,40,80,160,320,640
uses wincrt;
var
i:real;
begin
i:=5;
while i<641 do
begin
writeln(i:2:0);
i:=2*i;
end;end.
I. Program Balok
uses wincrt;
var
p,l,t,LP,V:real;
begin
writeln('program Balok');
write('Panjang:');readln(p);
write('Lebar:');readln(l);
write('Tinggi:');readln(t);
LP:=2*p*l+2*p*t+2*l*t;
V:=p*l*t;
writeln('Luas Permukaan:',LP:10:10);
writeln('Volume:',V:10:10);
end.
II. Pola Angka 0,3,6,9,12,15,18,21
uses wincrt;
var
i:real;
begin
i:=0;
while i<22 do
begin
writeln(i:2:0);
i:=i+3;
end;end.
III. Pola Angka 5,10,20,40,80,160,320,640
uses wincrt;
var
i:real;
begin
i:=5;
while i<641 do
begin
writeln(i:2:0);
i:=2*i;
end;end.