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)
Tham khảo theo link nhé bạn: https://hoc24.vn/hoi-dap/tim-kiem?id=603125&q=t%C3%ADnh%20t%E1%BB%95ng%20c%C3%A1c%20s%E1%BB%91%20t%E1%BB%B1%20nhi%C3%AAn%20t%E1%BB%AB%20100%20%C4%91%E1%BA%BFn%201000%20%28v%C3%B2ng%20l%E1%BA%B7p%20v%E1%BB%9Bi%20s%E1%BB%91%20l%E1%BA%B7p%20ch%C6%B0a%20bi%E1%BA%BFt%29
![](https://rs.olm.vn/images/avt/0.png?1311)
program tong_100_so_tu_nhien;
uses crt;
var i, S: integer;
begin
S := 0;
for i := 1 to 100 do
S := S + i;
writeln('Tong cua 100 so tu nhien dau tien la ', S);
readln;
end.
Var i,s:integer;
Begin
i:=1;
s:=0;
While i<=100 do
Begin
s:=s+i;
i:=i+1;
End;
Write('Tong la ',s);
Readln;
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
Câu 1:
uses crt;
var s,i:integer;
begin
clrscr;
s:=0;
for i:=1 to 10 do
s:=s+i;
writeln('Tong cua 10 so tu nhien dau tien la: ',s);
readln;
end.
Câu 2:
uses crt;
var a:array[1..100]of integer;
i,n,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if a[i]>0 then inc(dem);
writeln('So luong phan tu duong la: ',dem);
readln;
end.
Câu 3:
uses crt;
var i,j:integer;
begin
clrscr;
for i:=1 to 9 do
begin
writeln('Bang nhan ',i,' la: ');
for j:=1 to 10 do
writeln(i,'*',j,'=',i*j);
delay(200);
end;
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
i:=1;
t:=0;
while i<=n do
begin
if i mod 2=0 then t:=t+i;
i:=i+1;
end;
write(t);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var i:integer;
begin
clrscr;
i:=1;
while i<=10 do
begin
if i mod 2=1 then write(i:4);
i:=i+1;
end;
readln;
end.
1/
Program tinh_tong;
Var i, S: Integer;
Begin
i:= 100;
S: = 0;
While i <=1000 do
S:= S + i;
i:= i + 1;
Writeln(‘ Tong cac so tu nhien tu 100 den 1000 la:’,S); Readln;
End.
2/
Uses crt;
var a: array [1..100] of integer;
n, i, s: integer;
tb: real;
begin
clrscr;
write ('Nhap so luong phan tu: ');
readln (n);
for i:= 1 to n do readln (a[i]);
s:=s+a[i];
tb:=s/n;
writeln ('Gia tri trung binh cong cua mang la ',tb);
write ('Cac phan tu nho hon gia tri trung binh cong: ');
for i:= 1 to n do if a[i]<tb then write (a[i]:5); readln
end.
1/