通过代码:
#include <bits/stdc++.h> using namespace std; long long n; int main(){ scanf("%lld", &n); if(n > 0) printf("positive"); else if(n == 0) printf("zero"); else printf("negative"); return 0; }
1039:判断数正负
最新推荐文章于 2023-11-29 15:43:03 发布
通过代码:
#include <bits/stdc++.h> using namespace std; long long n; int main(){ scanf("%lld", &n); if(n > 0) printf("positive"); else if(n == 0) printf("zero"); else printf("negative"); return 0; }