Guest User

Untitled

a guest
Dec 13th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. uses crt,ustos;
  2.  
  3. var
  4. j,i,k,a,b:longint;
  5.  
  6.  
  7. begin
  8.  
  9. inicjuj;
  10.  
  11. randomize;
  12. clrscr;
  13.  
  14. writeln('pojemnosc stosu: 100');
  15.  
  16. writeln('ile liczb chcesz dodac');
  17. readln(a);
  18.  
  19. for i:=1 to a do
  20.  
  21. begin
  22.  
  23.  
  24. j:=random(10);
  25.  
  26.  
  27. if pelny = true then
  28.  
  29. begin
  30. writeln('stos pelny nie udalo sie dodac liczby');
  31. inc(k);
  32.  
  33. end
  34. else
  35. begin
  36.  
  37. wstaw(j);
  38. inc(b);
  39.  
  40.  
  41. end;
  42.  
  43. end;
  44.  
  45. writeln;
  46. writeln('pojemnosc stosu to 100 nie udalo sie dodac ',k,' liczb');
  47. writeln;
  48.  
  49. for i:=1 to b do
  50.  
  51. begin
  52. writeln('wartosc zdjeta ze stostu to: ',zdejmij);
  53.  
  54.  
  55.  
  56.  
  57. end;
  58.  
  59.  
  60. readln;
  61. readln;
  62.  
  63.  
  64. end.
Add Comment
Please, Sign In to add comment