Bài 1:
uses crt;
var i,tong:byte;
BEGIN
clrscr;
tong:=0;
for i:=1 to 10 do
tong:=tong+i;
write('Tong cua 10 so tu nhien dau tien la:',tong);
readln
END.
Bài 2:
uses crt;
var i,n,dem:byte;
a:array[1..100] of integer;
BEGIN
clrscr;
write('Nhap n:'); readln(n);
dem:=0;
for i:=1 to n do
begin
write('Nhap a[',i,']:');
readln(a[i]);
if a[i]>0 then inc(dem);
end;
write('Co ',dem,' so duong trong day so tren.');
readln
END.
Bài 3:
uses crt;
var n,i:integer;
BEGIN
clrscr;
write('Nhap n:'); readln(n);
for i:=1 to 9 do
writeln(n,' x ',i,' = ',n*i);
readln
END.
Chúc bạn học tốt.
Cho mình xin ctlhn.