这是在一串数字中找偶数的,麻烦大家看一下,求指正
#include<stdio.h>#define ARR_SIZE 10
Select(int num[],int n)
{
int i;
for(i=0;i<n;i++)
{
if(num[i]%2==0)
{
printf("%d",num[i]);
}
}
}
main()
{
int num[ARR_SIZE];
int n,i;
printf("please enter the total number:");
scanf("%d",&n);
printf("please enter the integers:");
for(i=0;i<n;i++)
{
scanf("%d",&num[i]);
}
Select(num,n);
printf("%2d",num[i]);
getch();
}