Wednesday, June 1, 2016

Starting Out with C++, 8th Edition Early Objects 8th Edition Solutions Chapter 2 (4 to 6)

Problem 4:


Restaurant Bill


Write a program that computes the tax and tip on the restaurant bill for a patron with a $44.50 meal charge. The tax should be 6.75 percent of the meal cost. The tip should be 15 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount, and total bill on the screen.






















Download Source Code:Click Here






Output:


















Problem 5:


Cyborg Data Type Sizes

You have been given a job as a programmer on a Cyborg supercomputer. In order to accomplish some calculations, you need to know how many bytes the following data types use: char, int, float, and double. You do not have any manuals, so you can't look up this information, Write a C++ program that will determine the amount of memory used by these types and display the information on the screen.















Download Source Code:Click Here



Output:




No comments:

Post a Comment