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.
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.
var i,n,s:integer;
begin
write('nhap n = ');readln(n);
i:=1;
while i<=n do
begin
s:=s+i;
i:=i+1;
end;
write('Tong la ',s);
readln;
end.
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i;
inc(i);
end;
writeln(s);
readln;
end.
program tinhtong;
var n,i : integer;
S : real;
begin
write('Nhap n: ');
readln(n);
i:=1;
S:=0;
while i<=n do
begin
S:=S+1/i;
i:=i+1;
end;
writeln('Tong S= ',S);
readln;
end.
program tinh_tong_S;
var
n, i: integer;
S: real;
begin
write('Nhap n: ');
readln(n);
S := 0;
i := 1;
while i <= n do
begin
S := S + 1 / i;
i := i + 1;
end;
writeln('Tong S la: ', S:0:2);
readln;
end.
*while..do
Program HOC24;
var i,n: integer;
s: real;
begin
write('Nhap n: '); readln(n);
i:=1;
while i<=n do
begin
s:=s+1/sqr(i);
i:=i+1;
end;
write('S= ',s:6:2);
readln
end.
Program HOC24;
var i,n: integer;
S: longint;
begin
write('Nhap N: '); readln(n);
i:=2; s:=0;
while i<=n do
begin
s:=s+i;
i:=i+2;
end;
write('S=',S);
readln
end.
program TongCacSoChan;
var
n, s, i: integer;
begin
write('Nhap n: ');
readln(n);
s := 0;
i := 2;
while i <= n do
begin
s := s + i;
i := i + 2;
end;
writeln('Tong cac so chan la: ', s);
readln;
end.
uses crt;
var i,n,s:integer;
begin
clrscr;
readln(n);
s:=0;
i:=0;
while i<=n do
begin
i:=i+1;
s:=s+i*i;
end;
writeln(s);
readln;
end.