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 n,i,s:integer;
begin
clrscr;
n:=1;
s:=0;
repeat
s:=s+n;
n:=n+1;
until s>1000;
writeln(n);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
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;
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of integer;
i,n,t,ln,nn:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
ln:=a[1];
nn:=a[1];
t:=0;
for i:=1 to n do
begin
if ln<a[i] then ln:=a[i];
if nn>a[i] then nn:=a[i];
t:=t+a[i];
end;
writeln(ln);
writeln(nn);
writeln(t);
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:4);
readln;
end.
var n,i,max,min,s: integer;
a: array[1..100] of integer;
begin
readln(n);
for i:=1 to n do begin
readln(a[i]);
s:=s+a[i];
end;
max:=a[1]; min:=a[1];
for i:=2 to n do begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('MAX=',max,' | MIN=',min);
for i:=1 to n do if a[i] mod 2=0 then write(a[i],' '); writeln;
write('Tong = ',s);
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var t,n:integer;
begin
clrscr;
t:=0;
n:=0;
while t<=10 do
begin
n:=n+1;
t:=t+n;
end;
writeln(t);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program tim_tong;
uses crt;
var x,i,tong:longint;
begin
clrscr;
tong:=0;i:=1;
while tong<=3500 do
begin
write('x',i,'=');readln(x);
tong:=tong+x;
i:=i+1;
end;
write('tong cac so tren la:',tong);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Var i,s:integer;
Begin
i:=0;
While s<=1000 do
Begin
i:=i+1;
s:=s+i;
End;
Write('n nho nhat la ',i);
Readln;
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 1:
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
for i:=1 to n do
if i mod 6=0 then s:=s+i;
writeln(s);
readln;
end.
Bài 2:
uses crt;
var a,b,c,ucln,i:integer;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
while a<>b do
begin
if a>b then a:=a-b
else b:=b-a;
end;
ucln:=a;
while ucln<>c do
begin
if ucln>c then ucln:=ucln-c
else c:=c-ucln;
end;
writeln(ucln);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
uses crt;
var i,n,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 300 do
begin
t:=t+i;
if (t>300) then break;
end;
writeln(t);
readln;
end.