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
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 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.
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long s,i,n;
int main()
{
cin>>n;
s=0;
for (i=1; i<=n; i++)
if (i%2==1) s=s+i*i;
cout<<s;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
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.