返回列表 發帖
本帖最後由 王建葦 於 2019-10-18 19:08 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string name[]={"Millet           "
  7.                   ,"SONY             "
  8.                   ,"Samsung          "
  9.                   ,"OPPO             "
  10.                   ,"APPLE            "
  11.                   ,"Koreafish        "
  12.                   ,"ASUS             "
  13.                   ,"VegetablesEnglish"};
  14.     int m[]={9000,7000,7000,8000,50000,0,9000,0};
  15.     cout<<"=====不知道賣什麼的專賣店====="<<endl;
  16.     cout<<"[商品價目表]"<<endl;
  17.     for(int i=0;i<=7;i++)
  18.     {
  19.         cout<<"("<<i+1<<")"<<name[i]<<"\t"<<m[i]<<"元"<<endl;     
  20.     }
  21.     cout<<"總金額: "<<sum<<"元"<<endl;
  22.     system("pause");
  23.     return 0;
  24. }
  25.   
複製代碼
Jian-wei Wang

TOP

返回列表