求各位指点错误:商店销售一产品,一次购十件打折9.8,价格由售货员自定,求该商店每件商品的均价
#include <iostream>using namespace std;
class product
{public:
product(int n,int q,int p ):num(n),quantity(q),price(p){};
static int display();
private:
int num;
int quantity;
int price;
static int sum;
static int fcount;
};
int product:: display()
{
int cout=0,i=0;
for(i=0;i<3;i++)
{
cout<<"please input num,quantity and the price"<<endl;
cin>>nu[i].num>>endl>>nu[i].quantity>>endl>>nu[i].price>>endl;
if (n[i].quantity>10) price=0.98*price;
sum+=price;
count++;
return sum;
}
int product::sum=0;
int product::count=0;
int main()
{
int x,y;
product nu[3]={
product (01,1,15),
product (02,3,10),
product(03,20,20)};
x=display();
y=average();
cout<<y;
return 0;
}