1)
var k,s,i:integer;
begin
k:=0;
s:=0;
for i:=100 to 200 do
if i mod 7 = 0 then
k:=k+1;
s:=s+i;
end;
writeln('Cумма = ', s);
writeln('Кол-во = ', k);
end.
2)
var x,max:integer;
write('Введите число = '); readln(x);
max:=0;
while x > 0 do
if x mod 10 > max then max:=x mod 10;
x:=x div 10;
writeln(max);
3)
for i:=200 to 300 do
if i mod 8 = 0 then
4)
repeat
until x <= 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
1)
var k,s,i:integer;
begin
k:=0;
s:=0;
for i:=100 to 200 do
if i mod 7 = 0 then
begin
k:=k+1;
s:=s+i;
end;
writeln('Cумма = ', s);
writeln('Кол-во = ', k);
end.
2)
var x,max:integer;
begin
write('Введите число = '); readln(x);
max:=0;
while x > 0 do
begin
if x mod 10 > max then max:=x mod 10;
x:=x div 10;
end;
writeln(max);
end.
3)
var k,s,i:integer;
begin
k:=0;
s:=0;
for i:=200 to 300 do
if i mod 8 = 0 then
begin
k:=k+1;
s:=s+i;
end;
writeln('Cумма = ', s);
writeln('Кол-во = ', k);
end.
4)
var x,max:integer;
begin
write('Введите число = '); readln(x);
max:=0;
repeat
if x mod 10 > max then max:=x mod 10;
x:=x div 10;
until x <= 0;
writeln(max);
end.