JolyJDIA

Untitled

May 7th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.39 KB | None | 0 0
  1. program zadaha;
  2.  
  3. var a, b, c, d, i : Integer; mas : array[1..20] of Integer;
  4.  
  5. begin
  6.   for i := 1 to 20 do mas[i] := random(4)+2;
  7.   write(mas);
  8.   for i := 1 to 20 do
  9.   begin
  10.     if mas[i] = 5 then
  11.       a := a + 1;
  12.     if mas[i] = 4 then
  13.       b := b + 1;
  14.     if mas[i] = 3 then
  15.       c := c + 1;
  16.     if mas[i] = 2 then
  17.       d := d + 1;
  18.   end;
  19.   write(a, ' ', b, ' ', c, ' ', d)
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment