var n,c,a,i:integer;
Begin
i:=0;
c:=0;
Write('n=');
Readln(n);
while i<>n do Begin
Readln(a);
if (a div 100>0) and (a div 1000<1) and (a mod 3=0) then c+=1;
i+=1
end;
Writeln('Трехзначных чисел кратных трем = ',c);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var n,c,a,i:integer;
Begin
i:=0;
c:=0;
Write('n=');
Readln(n);
while i<>n do Begin
Readln(a);
if (a div 100>0) and (a div 1000<1) and (a mod 3=0) then c+=1;
i+=1
end;
Writeln('Трехзначных чисел кратных трем = ',c);
end.