Tuesday, July 28, 2009

Programming Help (HW) C++?

I dont want to copy it.... I need to learn it... but i keep running into hundreds of errors. Here is the problem. Im going to look at how u did it and then apply it.





heres the problem...


please do the program....





thanks





A movie theater only keeps a percentage of the revenue earned from ticket


sales. The remainder goes to the movie company. Write a program that calculates


a theater's gross and net box office profit for a night. The program should ask


for the name of the movie, and how many adult and child tickets were sold. The


price of an adult ticket is $6.00 and a child's ticket is $3.00. It should


display a report similar to:





Movie Name: "Death Grip"


Adult Tickets Sold: 382


Child Tickets Sold: 127


Gross Box Office Profit $ 2673.00


Net Box Office Profit $ 534.60


Amount Paid to Distributor: $ 2138.40





Note: Assume the theatre keeps 20% of the gross box office profit.





Additional class requirement and notes:


Your output format (not the content) should match the above precisely.


For instance, notice all the numbers are lined up on the decimal. Place the


quote of the movie name above the dollar sign, and let the movie name spill out


over the right side.


This is the type of alignment which is important to achieve in order to


demonstrate your mastery of the setw() commands, etc.


Note from your reading that the movie name will require a 'cin.getline()'


command, since it could contain more than one word; the cin function only


inputs one word (up to the first space).


If you have problems with the input passing the cin.getline command,


precede that command with cin.ignore(20, '/n'). This is also explained in the


chapter but often overlooked.





Output example (though more fancy than necessary):

Programming Help (HW) C++?
Why don't you send what you did and we will look at it and tell you your problem. This way you don't have to copy it, like you said. ;-)
Reply:Does not look easy. May be you can contact a C++ expert to help you code your assignment. Check websites like http://askexpert.info/


No comments:

Post a Comment