Lexington High School Mathematics Math Dept. Front Page  | Student Links  | Family Links 
Introduction to C++, Kevin Kelly Kelly Front Page  | C++ Course Guide | C++ Assignments | C++ Info

Assignment 5: Postage rates

due Monday 2/11

Write a program that calculates postage for mail sent within the United States. The program should prompt the user for the weight of a piece of mail (in ounces), then display the correct amount of postage.

Here are the basic postage rates you will need to use:

To handle decimal parts of ounces correctly, you will need to use a rounding operation. Here are some hints on rounding.


Extensions

For 10 points: For items that weigh more than 13 ounces, there is a different set of postage rates, called Priority Mail Rates. Make your program correctly handle these rates, which are listed on the USPS site.