fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. const double Adult_Ticket = 5.5;
  8. const double Child_Ticket = 2.25;
  9.  
  10. int movieTitle;
  11. int adultticketSold;
  12. int childticketSold;
  13. int totalprofitfromTicketSold;
  14. int profitforBoxOffice;
  15. int profitforDistributor;
  16.  
  17. cout << "Enter Movie Name:____" << endl;
  18. cin >> movieTitle;
  19. cout << "Enter amount of adult tickets sold:____" << endl;
  20. cin >> adultticketSold;
  21. cout << "Enter amount of child tickets sold:____" << endl;
  22. cin >> childticketSold;
  23.  
  24. totalprofitfromTicketSold = adultticketSold * 5.5 + childticketSold * 2.25;
  25. profitforBoxOffice = totalprofitfromTicketSold * 0.20;
  26. profitforDistributor = totalprofitfromTicketSold * 0.80;
  27.  
  28. cout << "Total sales for the night " << totalprofitfromTicketSold << endl;
  29. cout << "Net Box Office Profit " << profitforBoxOffice << endl;
  30. cout << "Amount paid to distributor " << profitforDistributor << endl;
  31. return 0;
  32. }
Success #stdin #stdout 0s 4508KB
stdin
Standard input is empty
stdout
Enter Movie Name:____
Enter amount of adult tickets sold:____
Enter amount of child tickets sold:____
Total sales for the night 0
Net Box Office Profit 0
Amount paid to distributor 0