// 判断一个数是奇偶数
#include <stdio.h>
void judge_sd(int a)
{
if ((a & 1) == 0)
{
printf("是偶数\n");
return;
}
else
{
printf("是奇数\n");
return;
}
}
int main()
{
judge_sd(0);
judge_sd(1);
judge_sd(4);
return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/zhaoyaqian552/article/details/46687379