uses crt;
var a,i,j,k,z : integer;
begin
clrscr;
Writeln(' Program Kuadrat dan Kubik ');
writeln(' -------RIZKA FAJRIAH-------');writeln;
write ('Masukan angka : ');readln(a);
writeln;
write('Bilangan Kuadrat :');WRITELN;
for i := 1 to a do
begin
j := i * i ;
write(j,' ');
end;
writeln; writeln;
write('Bilangan Kubik: ');WRITELN;
for z:= 1 to a do
begin
k := z*z*z;
write(k,' ');
read;
end;
readkey;
end.
Output:
Subscribe to:
Post Comments
(
Atom
)