Program Menampilkan Bilangan secara acak
1. Menampilkan Bilangan decimal secara acak
uses crt;
var i : integer;
begin
clrscr; randomize;
begin
for i:=1 to 20 do
writeln(i,' ',random:4:2);
end;
writeln(random:4:2);
readln;
end.
2. Menampilkan Bilangan 1- 100 secara acak
Listing Program
uses crt;
var i : integer;
begin
clrscr; randomize;
begin
for i:=1 to 20 do
writeln(i,' ',random(100));
end;
writeln(random(100));
readln;
end.
Comments
Post a Comment