Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program zadaha;
- var a, b, c, d, i : Integer; mas : array[1..20] of Integer;
- begin
- for i := 1 to 20 do mas[i] := random(4)+2;
- write(mas);
- for i := 1 to 20 do
- begin
- if mas[i] = 5 then
- a := a + 1;
- if mas[i] = 4 then
- b := b + 1;
- if mas[i] = 3 then
- c := c + 1;
- if mas[i] = 2 then
- d := d + 1;
- end;
- write(a, ' ', b, ' ', c, ' ', d)
- end.
Advertisement
Add Comment
Please, Sign In to add comment