2 条题解

  • 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;
    }
    
    • 0
      @ 2025-8-20 15:09:06

      • 1

      信息

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