Program task1; var i, a, b, sum :integer; begin readln(a,b); sum:= 0; for i:= a to b do sum:= sum + sqr(i); writeln(sum); end.
program task2; var i, a, b, p :integer; begin readln(a,b); p:= 1; for i:= a to b do if (i mod 3 = 0) and (i mod 4 <> 0) then p:= p * i; writeln(p); end.
program task3; var i, exercise, sum :integer; begin for i:= 1 to 13 do begin readln(exercise); sum:= sum + 5 + exercise; if i = 5 then writeln(sum); if i = 10 then writeln(sum); end; writeln(sum); end.
var i, a, b, sum :integer;
begin
readln(a,b); sum:= 0; for i:= a to b do sum:= sum + sqr(i); writeln(sum);
end.
program task2;
var i, a, b, p :integer;
begin
readln(a,b); p:= 1; for i:= a to b do if (i mod 3 = 0) and (i mod 4 <> 0) then p:= p * i; writeln(p);
end.
program task3;
var i, exercise, sum :integer;
begin
for i:= 1 to 13 do begin readln(exercise); sum:= sum + 5 + exercise; if i = 5 then writeln(sum); if i = 10 then writeln(sum); end; writeln(sum);
end.