program exerc;
var a, b, c, d, e, count:integer;
begin
count := 0;
Readln(a); if a mod 3 = 0 then count += 1;
Readln(b); if b mod 3 = 0 then count += 1;
Readln(c); if c mod 3 = 0 then count += 1;
Readln(d); if d mod 3 = 0 then count += 1;
Readln(e); if e mod 3 = 0 then count += 1;
Writeln('Чисел кратных 3 всего: ', count);
end.
Объяснение:
program exerc;
var a, b, c, d, e, count:integer;
begin
count := 0;
Readln(a); if a mod 3 = 0 then count += 1;
Readln(b); if b mod 3 = 0 then count += 1;
Readln(c); if c mod 3 = 0 then count += 1;
Readln(d); if d mod 3 = 0 then count += 1;
Readln(e); if e mod 3 = 0 then count += 1;
Writeln('Чисел кратных 3 всего: ', count);
end.
Объяснение: