#include<stdio.h>
int main()
{
int m;
printf("Input m:");
scanf("%d",&m);
if(m > 0)
{
printf("%d is a positive ",m);
}
else if(m < 0)
{
printf("%d is a negative ",m);
}
else
{
printf("%d is zero.It is an ",m);
}
printf(m%2==0 ? "even\n" : "odd\n");
return 0;
}
判断输入整数的正负性和奇偶性