Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- mass: array [1..1000] of integer;
- count, balbal, maxcount:integer;
- i, j, n:integer;
- kontr:integer;
- begin
- Readln (n);
- for i:=1 to n do
- Readln (mass[i]);
- for i:=1 to n do
- Write (mass[i]:4);
- Writeln ();
- Writeln ('---------------------');
- for i:=1 to n do
- for j:=2 to n do
- begin
- if (mass[i] = mass[j]) then break;
- count := mass[i] + mass[j];
- if (count mod 3 = 0) then balbal := count
- else break;
- if (balbal > maxcount) then maxcount := balbal;
- end;
- if (maxcount = 0) then
- begin
- Writeln ('Программа завершена. Контроль не пройден. ');
- exit;
- end;
- Writeln ('Введите контрольное значение');
- Readln (kontr);
- if (kontr = maxcount) then
- begin
- Writeln ('Контроль пройден')
- end
- else
- begin
- Writeln ('Контроль не пройден');
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment