计算每组数据中所有奇数的乘积
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<math.h> 4 #include<string.h> 5 int main() 6 { 7 int n; 8 int b; 9 int s; 10 while (scanf("%d",&n)!=EOF) 11 { 12 s=1; 13 while (n--) 14 { 15 scanf("%d",&b); 16 if (0!=b%2) s*=b; 17 } 18 printf("%d ",s); 19 } 20 return 0; 21 }