Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
Uses Crt;
Var i,S,n:integer;
Begin
Clrscr;
Readln(i,S,n);
For i:=1 to n do S:=S+i*i;
Write(S);
Readln
End.
uses crt;
var s,i,n:longint;
begin
clrscr;
readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i*i;
i:=i+1;
end;
writeln(s);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Var a:array[1..15] of integer;
i,s:integer;
Begin
I:=1;
While i<=15 do
Begin
Write('Nhap phan tu thu ',i,' = ');readln(a[i]);
s:=s+a[i];
i:=i+1;
End;
Write('Tong la ',s);
Readln;
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
program TinhTongTich;
var
N, i, Tong, Tich:integer;
begin
writeln('Nhap so nguyen duong N:');
readln(N);
i:=1;
Tong:=0;
Tich:=1;
while i<=N do
begin
Tong:=Tong+i;
Tich:=Tich*i;
i:=i+1;
end;
writeln('Tong cac so tu 1 den ', N, ' la: ', Tong);
writeln('Tich cac so tu 1 den ', N, ' la: ', Tich);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program TongN;
var
n, i, tong: integer;
begin
tong := 0;
writeln('Nhap so nguyen duong N: ');
readln(n);
i := 0;
while i < n do
begin
i := i + 1;
tong := tong + i;
end;
writeln('Tong cac so tu 1 den ', n, ' la ', tong);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 1:
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
write('Nhap n='); readln(n);
s:=1;
for i:=1 to n do
s:=s*i;
writeln(n,'!=',s:0:0);
readln;
end.
1).
program oken;
uses crt;
var n,i: integer;
gt: qword;
begin
write('nhap n: '): readln(n);
gt:=1;
for i:=1 to n do gt:=gt*i;
writeln('N!=',gt);
readln;
end.
2).
program tongcacsole;
uses crt;
var t,i:longint;
begin
clrscr;
for i:=1 to 203 do
if i mod 2 = 1 then t:=t+i;
write(t);
end.
3).
program tongcacsochan;
uses crt;
var t,i:longint;
begin
clrscr;
for i:=1 to 20 do
if i mod 2 = 0 then t:=t+i;
write(t);
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Var i,n:integer;
Begin
Write('n = ');readln(n);
Write('Day so tu 1 den ',n,' la ');
For i:=1 to n do write(i:8);
Readln
End.
uses crt;
var n,i:integer;
a:real;
begin
clrscr;
repeat
write('n='); readln(n);
until n>0;
a:=0;
i:=1;
while i<=n do
begin
a:=a+1/i;
inc(i);
end;
writeln('A=',a:4:2);
readln;
end.