![](https://rs.olm.vn/images/avt/0.png?1311)
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)
![](https://rs.olm.vn/images/avt/0.png?1311)
tham khảo
uses crt;
var i,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 10 do
t:=t+i;
writeln('Tong cac so tu nhien tu 1 toi 10 la: ',t);
readln;
end.
refer
uses crt;
var i: integer;
begin
clrscr;
for i:= 1 to 10 do
begin writeln ( ' O ' ) end;
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Tham khảo:
Program BTH;
uses crt;
var i,n,s:longint;
Begin
clrscr;
write('Nhap n: ');readln(n);
i:=1;
While i<>n do
Begin
If i mod 2=0 then s:=s+i;
i:=i+1;
end;
writeln('Tong day so tren la: ',s);
readln;
end.
program tinh_tong_chan;
uses crt;
Var i,N,S: integer;
begin
clrscr;
writeln('nhap so n');
readln(N);
S:=0;
i:=1;
while i <= N do
begin
S:=S+i;
i:=i+1;
end;
Writeln('tong la: ',S);
readln;
end.
đây bạn nha
![](https://rs.olm.vn/images/avt/0.png?1311)
http://d.violet.vn//uploads/resources/present/2/114/529/preview.swf
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
Câu 1:
Dùng for..do
uses crt;
var a,i:integer;
begin
clrscr;
a:=0;
for i:=1 to 100 do
if i mod 2=0 then a:=a+i;
writeln(a);
readln;
end.
Dùng While...do
uses crt;
var a,i:integer;
begin
clrscr;
a:=0;
i:=1;
while i<=100 do
begin
if i mod 2=0 then a:=a+i;
inc(i);
end;
writeln(a);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var r,cv,dt: real;
const pi=3.14;
begin
clrscr;
write('Nhap ban kinh r: '); readln(r);
cv:=2*pi*r;
writeln('Chu vi= ',cv:0:2);
dt:=pi*r*r;
writeln('Dien tich= ',dt:0:2);
readln;
end.