#include using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ //class class fruit { public: string name; int price; int num; fruit(string n1,int p1,int k1) { name = n1; price = p1; num = k1; } }; int main(int argc, char** argv) { //1.variable fruit a1[] = { fruit("apple",30, 100), fruit("bala",15, 50), fruit("grape",50, 25) }; //陣列結尾要加上; int s1; while(s1 != 4) { cout<<"\ninput the name of fruit: 1."<>s1; switch(s1) { case 1: cout<