#include<stdio.h>void main(){int n,i,num,count1=0,count2=0;printf("请输入数字个数:");scanf("%d",&n);for(i=0;i<n;i++){printf("请输入第%d个数字:",i+1);scanf("%d",&num);if(num%2==0){count1++; //判断偶数个数}if(num%2!=0){count2++; //判断奇数个数}}printf("偶数有%d个\n",count1);printf("奇数有%d个\n",count2);}
700字范文,内容丰富有趣,生活中的好帮手!