PascalABC.NET
begin
var (x,m) := ReadInteger2('Введите x, m:');
var (n,sum) := (1,0);
while n <= m do begin
sum+=(x-6*n);
Inc(n);
end;
Writeln(Sum);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
PascalABC.NET
begin
var (x,m) := ReadInteger2('Введите x, m:');
var (n,sum) := (1,0);
while n <= m do begin
sum+=(x-6*n);
Inc(n);
end;
Writeln(Sum);
end.
x,m,n,sum: integer;
begin
n:=1;
sum:=0;
Write('Введите x,m');
Readln(x,m);
while n <= m do begin
sum:=(sum+x-6*n);
n:=n+1;
end;
Writeln(Sum);
end.