#include<iostream>
using namespace std;
class concerttickets
{
float price; // price of each ticket
float number; // number of the tickets
float totalSale; // total sale
public:
float a; //seats of A
float b; //seats of B
float c; //seats of C
float x; //price of seat A
float y; //price of seat B
float z; //price of seat C
float totalSales()
{
totalSale = a*x + b*y + c*z ; // total sale
cout << "Total Sale of the concert " << totalSale << endl;
}
};
int main()
{
concerttickets ct;
cout <<"Enter the number of seat of A \n" ;
cin >> ct.a;
cout <<"Enter the number of seat of B \n" ;
cin >> ct.b;
cout <<"Enter the number of seat of C \n" ;
cin >> ct.c;
cout <<"Enter the price of seat of A \n" ;
cin >> ct.x;
cout <<"Enter the price of seat of B \n" ;
cin >> ct.y;
cout <<"Enter the price of seat of C \n" ;
cin >> ct.z;
ct.totalSales();
}
Comments
Leave a comment