Câu 3
Var st:string;
i,d:integer;
Begin
Write('Nhap xau ky tu ');readln(st);
For i:=1 to length(st) do
If st[i] in ['0'..'9'] then d:=d+1;
Write('Co ',d,' ky tu so');
Readln
End.
Câu 4
Var a:array[1..1000] of integer;
i,n:integer;
Begin
Write('n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap so thu ',i);readln(a[i]);
End;
Write('Cac so chia het cho 3 hoac 5 la: ');
for i:=1 to n do
If (a[i] mod 3 = 0) or (a[i] mod 5 = 0) then write(a[i]:8);
Readln
End.