1
2
3
4
5
6
7
8
9
10
11
12
program 1;
uses crt;
var i,n,sum:integer;
Begin clrscr;
writeln("Enter n");
readln(n)
sum:=0;
for i:=1 to n do
sum:=sum+1;
writeln("result=",sum);
readln;
End.
Объяснение:
1
2
3
4
5
6
7
8
9
10
11
12
program 1;
uses crt;
var i,n,sum:integer;
Begin clrscr;
writeln("Enter n");
readln(n)
sum:=0;
for i:=1 to n do
sum:=sum+1;
writeln("result=",sum);
readln;
End.
Объяснение: