2 solutions

  • 0
    @ 2024-2-3 19:58:04

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	char a;							//定义字符变量 a
    	cin>>a;							//输入给定1个字符
    	cout<<"  "<<a<<endl;				//输入一个字符,先输出2个空格
    	cout<<" "<<a<<a<<a<<endl;		//输出3个字符,先输出1个空格
    	cout<<a<<a<<a<<a<<a<<endl;		//输出5个字符
    	return 0;
    }
    

    Information

    ID
    34
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    14
    Accepted
    9
    Uploaded By