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
begin clrscr;
k:=1;
s:=0;
while (s<700) do begin
k:=k+1
s:=s+k;
end;
writeln(s,' ',k);
readln;
end;
uses crt;
var n,s:integer;
begin
clrscr;
s:=0;
n:=0;
while s<=1000 do
begin
n:=n+1;
s:=s+n;
end;
writeln(s);
writeln(n);
readln;
end.
Bài 1:
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
Bài 2:
uses crt;
var a:array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
câu2
var n,i:integer;
s:real;
begin
write('n=');readln(n);
s:=0;
for i:=1 to n do s:=s+(1/(i*(i+1))); writeln(' Tong la: ',s); readln; end.bài 1:
uses crt;
var n,s:integer;
i:longint;
begin
clrscr;
readln(n);
for i:=1 to n do
s:=s+(1*i);
writeln(s);
readln
end.
bài 2:
uses crt; var x,y,ucln,t:integer; begin clrscr; readln(x,y);t:=x*y; While x<>y do If x>y then x:=x-y else y:=y-x;
ucln:=x;
t:=t div ucln; writeln(ucln);
readln
end.
bài 5:
uses crt;
var s,n:integer
i:longint;
begin
clrscr;
readln(n);
s:=0;
for i:=1 to n do
s:=s+i*2;
writeln(s);
readln
end.
uses crt;
var s,n:longint;
begin
clrscr;
s:=0;
n:=1;
while s<=10000 do
begin
s:=s+n;
inc(n);
end;
writeln(s);
writeln('So n nho nhat sao cho tong S>10000 la: ',n);
readln;
end.