返回列表 發帖
本帖最後由 黃子豪 於 2023-4-28 20:27 編輯
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4.     string name[]={"遙控汽車","飛機模型","足球    ","拼圖    ","玩具槍  ","可愛玩偶","籃球    "};
  5.     int price[]={450,550,325,200,660,150,380};
  6.     cout<<"☆★☆智能玩具店☆★☆"<<endl<<endl;
  7.     cout<<"[商品價目表]"<<endl;

  8.     for(int i=0; i<7; i++){
  9.         cout<<"("<<i+1<<")"<<name[i]<<"\t"<<price[i]<<"元"<<endl;        
  10.     }
  11.    
  12.     system("pause");
  13.     return 0;
  14. }
複製代碼

TOP

返回列表