include stdio include stdlib define int main void int for printf Input

 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
#include <stdio.h>
#include <stdlib.h>
#define N 7
int main(void)
{int p[N],i,j=0;
for(i=0;i<N;++i)
{
printf("Input p[%d]: ", i);
scanf("%d", p+i);
}
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;
}