3 solutions

  • 1
    @ 2025-2-16 10:18:05

    依葫芦画瓢,单词别打错就行

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int a;
        cin>>a;
        if(a>0){
            cout<<"positive ";
        }
        if(a==0){
            cout<<"zero";
        }
        if(a<0){
            cout<<"negative";
        }
        return 0;
    }
    
    • 1

      #include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; if(x > 0) { cout<<"positive"; } else { if(x == 0) { cout<<"zero"; } else { cout<<"negative"; } } return 0; }

      • 0
        @ 2024-12-11 18:30:58

        #include<bits/stdc++.h> using namespace std; int main(){ long long a; cin>>a; if (a>0) {cout<<"positive";} if (a==0) {cout<<"zero";} if (a<0) {cout<<"negative";} return 0; }

        • 1

        Information

        ID
        4485
        Time
        1000ms
        Memory
        128MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        182
        Accepted
        111
        Uploaded By