isar |
Wysłany: Czw 19:07, 07 Lut 2008 Temat postu: losuje 10roznych liczb,przypisuje je do tablicy(trudny) |
|
program losowanie ;
var a,licz,c,pet : integer ;
b : array [1..10] of integer ;
begin
writeln('zrobiony przez K.J');
randomize;
for pet:=1 to 10 do
begin
for a:=1 to 10 do
begin
licz:=random(30)+1;
for c:=1 to a do
if licz=b[c] then licz:=random(30)+1;
end;
b[pet]:=licz;
end;
writeln('--wyswietlam liczby ktore wylosowalem--');
for a:=1 to 10 do
writeln(b[a]);
readln;
writeln('zrobiony przez K.J');
end.
na ten program poswiecilem mase czasu, uszanuj to-nie kopiuj go. |
|