- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- string name[]={"手機 ","電腦 ","智慧型手錶","藍牙耳機","耳罩式耳機","折疊手機","電腦顯示器"};
- int price[]={450,3000,325,200,660,1200,380};
- cout<<"電子產品店"<<endl<<endl;
- cout<<"商品價目表:"<<endl;
-
- for(int i=0; i<7; i++) {
- cout<<"("<<i+1<<")"<<name[i]<<"\t"<<price[i]<<"$USD"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |