返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string name[]={"遙控器車","飛機模型","足球    ","拼圖    ","玩具槍  ","可愛玩偶","籃球    "};
  7.     int price[]={450,550,325,200,660,150,380};
  8.     cout<<"☆★☆智能玩具店☆★☆"<<endl<<endl;
  9.     cout<<"[商品價目表]"<<endl;
  10.     for(int i=0; i<7; i++)
  11.          cout<<"("<<i+1<<")"<<name[i]<<"\t"<<price[i]<<"元"<<endl;
  12.     cout<<"(8)結帳:"<<endl;
  13.     int i;
  14.         cout<<"請輸入商品代碼:"<<endl;
  15.         cin>>i;
  16.         if(i==8)
  17.         {
  18.                 goto checkout;
  19.         }
  20.     system("pause");   
  21.     return 0;
  22. }
複製代碼

TOP

返回列表