11 条题解

  • 9
    @ 2023-11-19 0:05:14

    输入字符需要用char来定义变量,用int 、float会报错

    #include <iostream>
    using namespace std;
    int main(){
    	char  ch;
    	cin>>ch;
    	cout<<"  "<<ch<<endl;
    	cout<<" "<<ch<<ch<<ch<<endl;
    	cout<<ch<<ch<<ch<<ch<<ch;
    	return 0;
    }
    
    • 3
      @ 2024-2-20 8:23:30
      #include<iostream>
      using namespace std;
      int main()
      {
      	char x;
      	cin>>x;
      	cout<<"  "<<x<<endl;
      	cout<<" "<<x<<x<<x<<endl;
      	cout<<x<<x<<x<<x<<x<<endl;
      	return 0;
      }
      
      • 2
        @ 2024-10-30 16:50:41

        • 1
          @ 2024-6-7 14:22:56
          #include<iostream>
          using namespace std;
          int main()
          {
          	char x;
          	cin>>x;
          	cout<<"  "<<x<<endl;
          	cout<<" "<<x<<x<<x<<endl;
          	cout<<x<<x<<x<<x<<x<<endl;
          	return 0;
          }
          
          • 0
            @ 2024-9-13 21:30:13

            #include using namespace std; int main(){ char ch; cin>>ch; cout<<" "<<ch<<endl; cout<<" "<<ch<<ch<<ch<<endl; cout<<ch<<ch<<ch<<ch<<ch; return 0; }

            • 0
              @ 2024-2-20 10:30:49
              #include<iostream>
              using namespace std;
              int main()
              {
              	char x;
              	cin>>x;
              	cout<<"  "<<x<<endl;
              	cout<<" "<<x<<x<<x<<endl;
              	cout<<x<<x<<x<<x<<x<<endl;
              	return 0;
              }
              
              • 0
                @ 2023-7-14 15:20:45

                提示:不是要直接打出***的三角形 有可能是###,%%%,具体打出来什么样子的三角形看输入的字符是什么?

                空格也是武器哦👀️

                • -1
                  @ 2024-2-21 9:24:46
                  #include<iostream>
                  using namespace std;
                  int main()
                  {
                  	char x;
                  	cin>>x;
                  	cout<<"  "<<x<<endl;
                  	cout<<" "<<x<<x<<x<<endl;
                  	cout<<x<<x<<x<<x<<x<<endl;
                  	return 0;
                  }
                  
                  • -1
                    @ 2024-2-21 8:58:16
                    • #include<iostream>
                      using namespace std;
                      int main()
                      {
                      	char x;
                      	cin>>x;
                      	cout<<"  "<<x<<endl;
                      	cout<<" "<<x<<x<<x<<endl;
                      	cout<<x<<x<<x<<x<<x<<endl;
                      	return 0;
                      }
                      

                      Copy *

                    • -1
                      @ 2024-2-20 10:31:05
                      #include<iostream>
                      using namespace std;
                      int main()
                      {
                      	char x;
                      	cin>>x;
                      	cout<<"  "<<x<<endl;
                      	cout<<" "<<x<<x<<x<<endl;
                      	cout<<x<<x<<x<<x<<x<<endl;
                      	return 0;
                      }
                      
                      • -4
                        @ 2024-3-1 16:45:06

                        我是人机

                        • 1

                        信息

                        ID
                        55
                        时间
                        1000ms
                        内存
                        128MiB
                        难度
                        6
                        标签
                        (无)
                        递交数
                        1258
                        已通过
                        390
                        上传者