C++ Assignment 5
Constants: Metric Conversion program
Program Requirements
- Write a program that asks the user for a metric value and then converts it into an English one.
Choose only one of the following (or make up your own):
- Ask the user for a number of grams and display the corresponding number of ounces
- Ask the user for a number of liters and display the corresponding number of gallons
- Ask the user for a number of kilometers and display the corresponding number of miles
- Use 3 functions +
main()
- Use a constant for the conversion, for example:
const double dGRAMS_PER_POUND = 454.1;
- Use Hungarian notation, whitespace, echo the input, indent code in curly braces
and all the elements of good style that we have learned so far
- Include comments that show sample output, and your name, class and assignment #.
- Attach the
.cpp
to email and send it to mrsimon@lycos.com
- Don't forget to put your name, class and assignment # on the subject line.