palm0919 發表於 2007-4-20 12:45:22

星型反向

#include<iostream>
using namespace std;
int main()
{
    int a,i,j;
    cout<<"輸入你想排的星形層:";
    cin>>a;
    for (i=1;i<=a;i++)
    {
      for(j=1;j<=a-i+1;j++)
      {
         cout<<"*";
         }
    cout<<"\n";
    }
    system("PAUSE");
    return 0;
}
幫你排版一下By NeoYang
頁: [1]
查看完整版本: 星型反向

Checking the Pageranks