代码如下:
#include <stdio.h>
main()
{
int i,count=0;
int a[10];
for(i=0;i<10;i++)
{scanf("%d",&a[i]);
if(a[i]%2==1)
count++;
}
printf("%d ",count);
}
结果如下:
58
96
71
11
21
35
58
69
96
28
5 请按任意键继续. . .
代码如下:
#include <stdio.h>
main()
{
int i,count=0;
int a[10];
for(i=0;i<10;i++)
{scanf("%d",&a[i]);
if(a[i]%2==1)
count++;
}
printf("%d ",count);
}
结果如下:
58
96
71
11
21
35
58
69
96
28
5 请按任意键继续. . .