Ch3_MovieTicketSales - /Chapter 3: Program Movie Ticket...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Chapter 3: Program Movie Ticket Sale / #include <iostream> #include <iomanip> #include <string> using namespace std; u int main() { //Step 1 string movieName; double adultTicketPrice; double childTicketPrice; int noOfAdultTicketsSold; int noOfChildTicketsSold; double percentDonation; double grossAmount; double amountDonated; double netSaleAmount; cout << fixed << showpoint << setprecision(2); //Step 2 cout << "Enter the movie name: "; //Step 3 getline(cin, movieName); //Step 4 cout << endl; cout << "Enter the price of an adult ticket: "; //Step 5 cin >> adultTicketPrice; //Step 6 cout << endl; cout << "Enter the price of a child ticket: "; //Step 7 cin >> childTicketPrice; //Step 8 cout << endl; cout << "Enter the number of adult tickets " << "sold: "; //Step 9 cin >> noOfAdultTicketsSold; //Step 10 cout << endl; cout << "Enter the number of child tickets " << "sold: "; //Step 11 cin >> noOfChildTicketsSold; //Step 12 cout << endl; cout << "Enter the percentage of donation: "; //Step 13
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course CSIT 139 taught by Professor Duzut during the Spring '11 term at Los Angeles City College.

Page1 / 2

Ch3_MovieTicketSales - /Chapter 3: Program Movie Ticket...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online