uses crt; var a:array[1..50] of longint; n,i:integer; begin clrscr; write(‘Nhap so luong phan tu (n<=50): ‘); readln(n); for i:=1 to n do begin write(‘Nhap phan tu thu ‘,i,’: ‘); readln(a[i]); end; write(‘Cac so le: ‘); for i:=1 to n do if a[i] mod 2=1 then write(a[i],’ ‘); readln; end.
program so_le;
uses crt;
var A:array[1..50] of integer;
n,i:integer;
begin
clrscr;
write(‘Nhap N= ‘); readln(n);
for i:=1 to n do
begin
write(‘Nhap so thu ‘,i,’: ‘); readln(A[i]);
end;
for i:=1 to n do
if A[i] mod 2=1 then write(A[i],’ ‘);
readln;
end.
uses crt;
var a:array[1..50] of longint;
n,i:integer;
begin
clrscr;
write(‘Nhap so luong phan tu (n<=50): ‘); readln(n);
for i:=1 to n do
begin
write(‘Nhap phan tu thu ‘,i,’: ‘); readln(a[i]);
end;
write(‘Cac so le: ‘);
for i:=1 to n do if a[i] mod 2=1 then write(a[i],’ ‘);
readln;
end.