Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses crt,ustos;
- var
- j,i,k,a,b:longint;
- begin
- inicjuj;
- randomize;
- clrscr;
- writeln('pojemnosc stosu: 100');
- writeln('ile liczb chcesz dodac');
- readln(a);
- for i:=1 to a do
- begin
- j:=random(10);
- if pelny = true then
- begin
- writeln('stos pelny nie udalo sie dodac liczby');
- inc(k);
- end
- else
- begin
- wstaw(j);
- inc(b);
- end;
- end;
- writeln;
- writeln('pojemnosc stosu to 100 nie udalo sie dodac ',k,' liczb');
- writeln;
- for i:=1 to b do
- begin
- writeln('wartosc zdjeta ze stostu to: ',zdejmij);
- end;
- readln;
- readln;
- end.
Add Comment
Please, Sign In to add comment