返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.         int a,b;
  6.         cout<<"input a number: ";
  7.         cin>>a;
  8.         while(a>0)
  9.         {
  10.                 cout<<"how many stars: ";
  11.                 cin>>b;
  12.                 while(b>0)
  13.                 {
  14.                         cout<<"*";
  15.                         b--;
  16.                 }
  17.                 cout<<"\n";
  18.                 a--;
  19.         }
  20.         system("pause");
  21.         return 0;
  22. }
複製代碼

TOP

返回列表