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 s,n:integer;
begin
clrscr;
s:=0;
n:=0;
while s<=500 do
begin
inc(n);
s:=s+n;
end;
writeln(s);
readln;
end.
Uses crt;
var
begin clrscr;
k:=1;
s:=0;
while (s<700) do begin
k:=k+1
s:=s+k;
end;
writeln(s,' ',k);
readln;
end;
program tim_n;
uses crt;
var tong,n,i:word;
begin
clrscr;
n:=1;tong:=0;
while tong<500 do
begin
for i:=1 to n do tong:=tong+i;
if tong<500 then begin tong:=0;n:=n+1;end
else n:=n-1;
end;
write('so n thoa man dieu kien la:',n);
readln;
end.
uses crt;
var i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
t:=0;
for i:=1 to 500 do
begin
t:=t+i;
if t>500 then
begin
writeln(i);
break;
end;
end;
readln;
end.
Program HOC24;
var i,n,t: integer;
begin
n:=1; t:=0;
while t<=500 do
begin
t:=t+n;
n:=n+1;
end;
writeln('Tong la: ',t);
write('So N nho nhat de tong lon hon 500 la: ',n);
readln
end.
*Cách khác: Dùng Repeat Until
uses crt;
var n,t:integer;
begin
clrscr;
t:=0;
n:=0;
repeat
n:=n+1;
t:=t+n;
until t>500;
writeln(t);
writeln(n);
readln;
end.
FKsjcjalqwjfkzxjvskxkalakxkjfhdncsjakxndsjcjakxkcjsakxkxkakcjalcx.?xzxz.!xx!xxkxjxxkxjdsxxkxjxxkxjdsjdjxxkxjxxkxjdsxxkxjxxkxjdsjdjak₫(#(₫(#(₫#(#(₫(₫;₫;₫(*((*:#;*)fkfkfjshdhfhxdhrefkfkfjshdhfhxdhreujvgdjjcjgwejfjgjjffjidkxfdjjfnjjdhhc
Var n,s:integer;
Begin
n:=0;
s:=0;
While s<=1000 do
Begin
n:=n+1;
s:=s+n;
End;
Write('Tong la ',s);
Readln
End.