include stdio include stdlib define int main void int pp input mass fo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdlib.h>
#define N 7
int main(void)
{int p[N],i,j=0,*pp=p;
//input mass
for(i=0;i<N;++i)
{
printf("Input p[%d]: ", i);
scanf("%d", p+i);
}
//jb
for(i=0;i<N;++i)
{ if((p[i]>0) && (p[i]%2!=0))
{p[j]=p[i];
j++;
}
}
for(i=0;i<j;++i)
printf("%d ",*(p+i));
printf("\n");
system("PAUSE");
return 0;
}