scanf("%d", &N); printf("Sum of ( "); for ( i=0; i<N; i++ ) { scanf("%d", &List[i]); if ( even(List[i])==0 ) printf("%d ", List[i]); } printf(") = %d\n", OddSum(List, N));
return0; }
inteven( int n ){ if(n%2==0) { return1; }else { return0; } } intOddSum( int List[], int N ){ int i,sum=0; for(i=0;i<N;i++) { if(List[i]%2!=0) { sum=sum+List[i]; } } return sum; }