Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string name;
- int adultTicketsNumber, childTicketsNumber;
- double netPriceAdult, taxPrice, finalPrice, finalOutPut;
- cin >> name;
- cin >> adultTicketsNumber;
- cin >> childTicketsNumber;
- cin >> netPriceAdult;
- cin >> taxPrice;
- double priceChildTickets = netPriceAdult * 0.3;
- double childTicket = priceChildTickets + taxPrice;
- double adultTicket = netPriceAdult + taxPrice;
- finalPrice = (childTicketsNumber * childTicket) + (adultTicketsNumber * adultTicket);
- finalOutPut = finalPrice * 0.20;
- cout.setf(ios::fixed);
- cout.precision(2);
- cout << "The profit of your agency from " << name << " tickets is " << finalOutPut << " lv." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement