1 条题解

  • 1
    @ 2023-9-24 11:03:22
    #include<iostream>
    using namespace std;
    int main(){ //c++9级输出十字 
    	int n;
    	cin>>n;
    	for(int i=0;i<n;i++){
    		if(i==n/2){
    			for(int j=0;j<n;j++)
    				cout<<"*";
    		}else{
    			for(int j=0;j<n/2;j++)
    				cout<<" ";
    			cout<<"*";
    		}
    		cout<<endl;
    	}	
    	return 0;
    }
    
    • 1

    信息

    ID
    1153
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    (无)
    递交数
    15
    已通过
    11
    上传者