122 #include<bits/stdc++> using namespace std; int main(){
double x; cin>>x; if(x>0) cout<<1; else if(x==0) cout<<0; else cout<<-1; return 0; }
122 #include<bits/stdc++> using namespace std; int main(){
double x; cin>>x; if(x>0) cout<<1; else if(x==0) cout<<0; else cout<<-1; return 0; }
登录后即可回复本帖,与出题人和同学一起讨论。
登录