帮忙解决问题
#include<iostream>using namespace std;
class Customer
{
protected:
char Customer_name[20];
int IC_number;
public:
void get()
{
cout<<"\nEnter Customer Name: ";
cin>>Customer_name;
cout<<"\nEnter Customer IC: ";
cin>>IC_number;
}
};
class Prize : private Customer
{
private:
double pa;
public:
void accept();
void display();
};
void Prize :: accept()
{
get();
cout<<"\nEnter the purchase amount:";
cin>>pa;
}
void Prize :: display()
{
if(pa > 5000)
cout<<"\nThe Customer will get a plate set as a free gift."<<endl;
else
if(pa = 5000) || (pa < 5000) && (pa > 3000)
cout<<"\nThe free gift is a limited edition container."<<endl;
else
if(pa = 3000) || (pa < 3000)
cout<<"\nNo free gift."<<endl;
}
void main()
{
Prize obj;
obj.accept();
obj.display();
}