f0205.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:

C#编程

开发平台:

Visual C++

  1. //=====================================
  2. // f0205.cpp
  3. // 字符倒三角形
  4. //=====================================
  5. #include<iostream>
  6. using namespace std;
  7. //-------------------------------------
  8. int main(){
  9.   for(int i=1; i<=10; ++i){
  10.     for(int j=1; j<=i-1; ++j)
  11.       cout<<" ";
  12.     for(int k=1; k<=21-2*i; ++k)
  13.       cout<<"M";
  14.     cout<<endl;
  15.   }
  16. }//====================================
  17.