找回密碼
 註冊
搜索
熱搜: 活動 交友 discuz
查看: 1170|回覆: 0

[原創] 星型正向

[複製鏈接]
發表於 2007-4-20 12:43:16 | 顯示全部樓層 |閲讀模式
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,i,j;
  6.     cout<<"輸入你想排的星形層";
  7.     cin>>a;
  8.     for (i=1;i<=a;i++)
  9.     {
  10.         for(j=1;j<=i;j++)
  11.         {
  12.              cout<<"*";
  13.          }

  14.          cout<<"\n";
  15.     }
  16.     system("PAUSE");
  17.     return 0;
  18. }
複製代碼

幫你排版一下 By NeoYang
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Checking the Pageranks

Archiver|手機版|小黑屋|WEO

GMT+8, 2026-7-30 12:57 AM , Processed in 0.021556 second(s), 17 queries .

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回復 返回頂部 返回列表