C++怎么输出偶数奇数和?
C++怎么输出偶数奇数和?
日期:2019-03-24 07:41:31 人气:1
#include#define N 10void main() { int a[N],i,s; printf("请输入%d个整数: ",N); for ( i=0;i<N;i++ ) scanf("%d",&a[i]); printf("%d个整数中,偶数有:\n",N); for ( i=0,s=0;i<N;i++ ) if ( a[i]%2==0 ) { printf("%d\n",a[i