判断正负
2024-10-24 22:33:48
发布于:江苏
0阅读
0回复
0点赞
几个if搞定
----------------------------------------------------------------------------------------------------------------------——————————————————————————————————————————------
#include<cstdio>
using namespace std;
int main(){
int N;
scanf("%d",&N);
if(N==0){
printf("zero");
}else if(N>0){
printf("positive");
}else{
printf("negative");
}
return 0;
}
这里空空如也
有帮助,赞一个