文章目录
- 有符号数是如何判断正负符号位的?
- 运行结果:
有符号数是如何判断正负符号位的?
#include<stdio.h>
int main()
{int input_data = 0;printf("Please input the data ! \n");scanf("%d",&input_data);if (input_data>=0) {if (input_data !=0){printf("The data is Postive ! \n",input_data);}elseprintf("%d:是0", input_data);}elseprintf("%d The data is negtive ! \n", input_data);return 0;
}