返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main(){
  5.     string name[]={"手機   ","電腦   ","智慧型手錶","藍牙耳機","耳罩式耳機","折疊手機","電腦顯示器"};
  6.     int price[]={450,3000,325,200,660,1200,380};
  7.     cout<<"電子產品店"<<endl<<endl;
  8.     cout<<"商品價目表:"<<endl;
  9.    
  10.     for(int i=0; i<7; i++) {
  11.          cout<<"("<<i+1<<")"<<name[i]<<"\t"<<price[i]<<"$USD"<<endl;
  12.     }
  13.     system("pause");
  14.     return 0;
  15. }
複製代碼

TOP

返回列表