返回列表 發帖
本帖最後由 曹祁望 於 2023-2-3 19:37 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main(){
  5.     int i, j;
  6.     for(i=1; i<=4; i+=1)
  7.     {
  8.         for(j=2; j<=i; j+=1)
  9.         {
  10.             cout<<" ";
  11.         }
  12.         for(j=1; j<=10; j+=1)
  13.         {
  14.             cout<<"*";
  15.         }
  16.         cout<<"\n";            
  17.     }
  18.    
  19.     system("pause");
  20.     return 0;
  21. }
  22. //老師請問什麼是指標陣列?它為甚麼可以儲存不同資料型態的資料?
  23. //python的list是linked list還是指標陣列?
複製代碼

TOP

返回列表