program Bang_cuu_chuong ;
ues crt ;
var N , i : interger ;
begin
clrscr ;
write ('Nhap so N = ' ) ; Readln ( N) ;
writeln ;
writeln ( 'Bang nhan 5 ', N) ;
writeln ;
for i :=1 to 10 do writeln ( N,'x',i:2,'=',N*i:3 ) ;
readln
end .
khi chạy ấn số 5
Bài 1:
uses crt;
var i:integer;
begin
clrscr;
for i:=1 to 10 do
writeln('5*',i,'=',5*i);
readln;
end.
Bài 2:
uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
n:=7;
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
if (a[i]>0) and (a[i] mod 3=0) then write(a[i]:4);
readln;
end.