6 条题解

  • 1
    @ 2024-3-16 10:28:48
    #include<bits/stdc++.h> 
    using namespace std; 
    int main(){ 
        char E,e,N,n,S,s,W,w; 
    	cin>>n; 
    	if(n=='E' or n=='e'){ 
    	    cout<<"East"; 
    	} 
    	else if(n=='W' or n=='w'){ 
    	    cout<<"West"; 
    	} 
    	else if(n=='S' or n=='s'){ 
    	    cout<<"South"; 
    	} 
    	else if(n=='N' or n=='n'){ 
    	    cout<<"North"; 
    	} 
    	else{ 
    	    cout<<"Wrong";
        } 
    	return 0; 
    }
    
    • 1
      @ 2023-4-24 19:13:49

      感谢牛亮同学提供的代码👍 image

      • -2
        @ 2023-6-10 9:21:37

        #include<bits/stdc++.h> using namespace std; int main(){ char E,e,N,n,S,s,W,w; cin>>n; if(n=='E' or n=='e') { cout<<"East"; } else if(n=='W' or n=='w') { cout<<"West"; } else if(n=='S' or n=='s') { cout<<"South"; } else if(n=='N' or n=='n') { cout<<"North"; } else { cout<<"Wrong"; } return 0; }~~~~

        • -3
          @ 2023-5-9 11:52:44

          #include<bits/stdc++.h> using namespace std; int main(){ char E,e,S,s,W,w,N,n; cin>>n; if(n=='E' or n=='e') cout<<"East"; else if(n=='S' or n=='s') cout<<"South"; else if(n=='W' or n=='w') cout<<"West"; else if(n=='N' or n=='n') cout<<"North"; else cout<<"Wrong"; return 0; }

          • -3
            @ 2023-4-27 11:47:46

            #include<bits/stdc++.h> using namespace std; int main(){ char E,e,N,n,S,s,W,w; cin>>n; if(n=='E' or n=='e') { cout<<"East"; } else if(n=='W' or n=='w') { cout<<"West"; } else if(n=='S' or n=='s') { cout<<"South"; } else if(n=='N' or n=='n') { cout<<"North"; } else { cout<<"Wrong"; } return 0; }

            • -3
              @ 2023-4-24 21:36:57

              #include<bits/stdc++.h> using namespace std; int main(){ char n,e,E,S,s,W,w,N; cin>>n; if(n=='e' or n=='E'){ cout<<"East"; }else if(n=='S' or n=='s'){ cout<<"South"; }else if(n=='W' or n=='w'){ cout<<"West"; }else if(n=='N' or n=='n') cout<<"North"; else cout<<"Wrong"; return 0; }//***输入看成5了

              • 1

              信息

              ID
              606
              时间
              1000ms
              内存
              256MiB
              难度
              3
              标签
              递交数
              42
              已通过
              24
              上传者