A)
Uses crt;
Var i,tich: integer ;
a:array[1..100]of integer;
Begin
Clrscr;
Write('nhap n: '); readln(n);
For i:=1 to n do
Begin
Write('a[',i,']=');readln(a[i]);
End;
For i:=1 to n do if a[i]>9 then tich:= tich *i;
Writeln('Tich cua cac so lon hon 9 la:',tich);
Readln;
End.
B)
Uses crt;
Var i: integer ;
a:array[1..100]of integer;
Begin
Clrscr;
For i:=1 to 7 do
Begin
Write('a[',i,']=');readln(a[i]);
End;
Writeln('cac so lon hon 9 la: ');
For i:=1 to n do if a[i]>9 then write(a[i]:3);
Readln;
End.
Hết!
CÁC BN NHỚ VOIT 5* NHA, THANKS!