本帖最後由 tonyh 於 2018-6-20 17:10 編輯
利用巢狀迴圈, 試做一個長為10顆*, 高為4顆*, 之平行四邊形, 排列如下圖:
 - #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- for(____________)
- {
- for(____________)
- {
- cout<<" ";
- }
- for(____________)
- {
- cout<<"*";
- }
- cout<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼本帖隱藏的內容需要回復才可以瀏覽 |