返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.         int a=9;
  7.         for(int i=5;i>0;i--)
  8.         {
  9.                 for(int j=i;j<5;j++)
  10.                 {
  11.                         cout<<" ";
  12.                 }
  13.                 for(int k=a;k>0;k--)
  14.                 {
  15.                         cout<<"*";
  16.                 }
  17.                 cout<<"\n";
  18.                 a=a-2;
  19.         }
  20. system("pause");
  21. return 0;
  22. }
複製代碼

TOP

返回列表