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

TOP

返回列表