7 条题解

  • 5
    @ 2026-5-26 13:45:22
    #include <iostream>
    #include <string>
    using namespace std;
    int main(){
    	int x;
    	cin>>x;
    	string s[]={"one","two","three","four","five","six","seven","eight","nine"};
    	cout<<"My cat is "<<s[x-1]<<" years old."<<endl;
    	return 0;
    }
    
    

    很简单易懂吧

    • 2
      @ 2026-5-27 13:21:01
      #include <iostream>
      #include <string>
      using namespace std;
      int main(){
      	int	x;
      	cin >> x;
          string s[]={"","one","two","three","four","five","six","seven","eight","nine"};
          cout<< "my cat is " <<s[x]<<" years old"<<endl;
          return 0;
      }
      
      

      运行是从0开始要给它个空白文件

      • 2
        @ 2026-4-27 15:28:25

        #include #include using namespace std; int main() { int x; cin>>x; string shu[]={"one","two","three","four","five","six","seven","eight","nine"}; cout<<"My cat is "<<shu[x-1]<<" years old."<< endl; return 0; }

        • 1
          @ 2026-7-24 15:25:30

          1是单数,第一问应该用year,不应该用years

          • 1
            @ 2026-4-27 9:09:52

            #include using namespace std;

            int main() { int x; cin>>x; string words[]={"","one","two","three","four","five"<"six","seven","eight","nine"}; cout<<"my cat is"<<words[x]<<"years old"; return 0; }

            • -2
              @ 2026-6-5 15:17:42
              using namespace std;
              int main(){
                  int a;
                  cin>>a;
                  cout<<"My cat is ";
                  if(a==1){
                  	cout<<"one";
              	}
              	else if(a==2){
                  	cout<<"two";
              	}
                  else if(a==3){
                  	cout<<"three";
              	}
              	else if(a==4){
                  	cout<<"four";
              	}
              	else if(a==5){
                  	cout<<"five";
              	}
              	else if(a==6){
                  	cout<<"six";
              	}
              	else if(a==7){
                  	cout<<"seven";
              	}
              	else if(a==8){
                  	cout<<"eight";
              	}
              	else if(a==9){
                  	cout<<"nine";
              	}
              	else if(a==10){
                  	cout<<"ten";
              	}
              	cout<<" years old.";
              	
                   return 0;
              }
              
              
              • -11
                @ 2026-2-12 11:20:15

                /:v!py(qr}ov'&`&'qp\_u ○◎(&v!t○!nzr&#npr○&'q|◎v!'○n GD…○]○%|◎◎&'%v!t○-u?○&'%v!t○w]v!'○%%○○]v!'○'@§◎○○○○vs?%%~~%@§◎○○○○○○○○%r'(%!○w|◎○○○○★◎○○○○ry&r§◎○○○○○○○○v!'○v~'|◎○○○○○○○○*uvyr?n v…~~D@§◎○○○○○○○○○○○○v\|◎○○○○○○○○★◎○○○○○○○○n v…~E|◎○○○○○○○○%%\|◎○○○○○○○○w~w\pun%?>E>^E\v@/○/|◎○○○○○○○○%r'(%!○-u?○w○]○%%○○]○'@|◎○○○○○○○○◎○○○○★◎★◎v!'○znv!?@§◎○○○○p"('}}-u?//○]○D○]○E@|◎◇%r'(%!○D|◎★◎\ 13

                • 1

                信息

                ID
                1
                时间
                1000ms
                内存
                256MiB
                难度
                1
                标签
                递交数
                1064
                已通过
                172
                上传者