palm0919 發表於 2007-4-20 12:43:16

星型正向

#include<iostream>
using namespace std;
int main()
{
    int a,i,j;
    cout<<"輸入你想排的星形層";
    cin>>a;
    for (i=1;i<=a;i++)
    {
      for(j=1;j<=i;j++)
      {
             cout<<"*";
         }

         cout<<"\n";
    }
    system("PAUSE");
    return 0;
}
幫你排版一下 By NeoYang
頁: [1]
查看完整版本: 星型正向

Checking the Pageranks