Pascal:
var a:array [1..10] of integer;
i:integer;
begin
for i:=1 to n do
begin
write ('A[',i,'] = ');
readln (a[i]);
end;
for i:=1 to 10 do
if a[i] mod 2 = 1 then write (a[i],' ');
end.
C++:
#include
using namespace std;
int main()
{
int a[10];
for (int i = 0; i<10; i++)<br> {
cout <<"A[" <<i <<"] = '";<br> cin >>a[i];
}
for (int i = 0; i<10; i++)<br> if (a[i]%2==1)
cout <<a[i] <<" ";<br> return 0;
}