Прошу, срочно!! ОГЭ, сейчас пробник

0 голосов
25 просмотров

Прошу, срочно!! ОГЭ, сейчас пробник


image

Информатика (3.1k баллов) | 25 просмотров
Дан 1 ответ
0 голосов
Правильный ответ

Program OGE;
var count, sum, max, a:integer;
begin
sum:=0;
count:=0;
max:=0;
while(max<100) do<br>begin
readln(a) ;
if (a = 0) then break;
if (a > 300) then writeln('Invalid number');
if(a mod 17 = 0) then
begin
sum+=a;
count+=1;
end;
max+=1;
end;
if(count > 0) and (sum > 0) then begin writeln(sum,' ', count);end
else begin writeln('NO!'); end;
end.

(199 баллов)