求奇数的乘积
#include<stdio.h> int main( ) { int N; while(scanf("%d",&N)!=EOF) { int i,mul=1,t; for(i=1;i<=N;i++) { scanf("%d",&t); if(t%2==1) mul*=t; } printf("%d\n",mul); } return 0; }
posted on 2011-04-28 12:06 more think, more gains 阅读(587) 评论(0) 编辑 收藏 举报