#include<stdio.h>
int main()
{
int n,i,a[100];
while(scanf("%d",&n)!=EOF) error C2466: cannot allocate an array of constant size 0
{ 不能在此int a[n];否则error C2133: ‘a‘ : unknown size;error C2057: expected constant expression;
int s=1;
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
if(a[i]%2!=0)
s=s*a[i];
}
printf("%d\n",s); //若掉\n则Presentation Error
}
return 0;
}
原文:http://www.cnblogs.com/gongpulin/p/3876374.html