QP8 - Quiz Program #8 Program Description: The Movies You...

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

View Full Document Right Arrow Icon
Quiz Program #8 Program Description: The Movies You are to write a program that simulates buying tickets at a movie theater. Your must implement the following function: // Pre-conditions: pCash points to a variable that stores // the amount of cash the user has before // buying movie tickets. pNumAdult and // pNumChild are pointers to variables // storing the number of adult and child // tickets the user currently has. // Post-conditions: the variable pointed to by pCash will // reflect the amount of cash left after // the movie ticket purchase, and the // variables pointed to by pNumAdult and // pNumChild will equal the number of // adult and child tickets the user has in // total. void buyTickets(double *pCash, int *pNumAdult, int *pNumChild); Your program should use the following constants: #define ADULT_TICKET_PRICE 10.50 #define CHILD_TICKET_PRICE 7.00 Your program should prompt the user at the beginning for how much money they have. Then, your program should ask the user if they want to purchase tickets. If they say yes,
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 06/09/2011 for the course COP 3223 taught by Professor Guha during the Spring '08 term at University of Central Florida.

Page1 / 2

QP8 - Quiz Program #8 Program Description: The Movies You...

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