Ответ:
1.
program z1;
var i,k2,k3,k5: integer;
begin
k2:=0;
k3:=0;
k5:=0;
for i:=0 to 100 do
if i mod 2 = 0 then k2:=k2+1;
if i mod 3 = 0 then k3:=k3+1;
if i mod 5 = 0 then k5:=k5+1
end;
writeln(k2);
writeln(k3);
writeln(k5)
end.
2.
program z2;
var a: integer;
repeat
write ('Введите число: ');
readln (a)
until a = -1
3.
program z3;
var i,s: integer;
s:=0;
for i:=-5 to 30 do s:=s+i;
writeln(s)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
1.
program z1;
var i,k2,k3,k5: integer;
begin
k2:=0;
k3:=0;
k5:=0;
for i:=0 to 100 do
begin
if i mod 2 = 0 then k2:=k2+1;
if i mod 3 = 0 then k3:=k3+1;
if i mod 5 = 0 then k5:=k5+1
end;
writeln(k2);
writeln(k3);
writeln(k5)
end.
2.
program z2;
var a: integer;
begin
repeat
write ('Введите число: ');
readln (a)
until a = -1
end.
3.
program z3;
var i,s: integer;
begin
s:=0;
for i:=-5 to 30 do s:=s+i;
writeln(s)
end.