Project 2.a Write program that asks the user for five numbers and then prints out the average of those numbers. When you run your program, it should… | Cheap Nursing Papers

Project 2.a Write program that asks the user for five numbers and then prints out the average of those numbers. When you run your program, it should…

Project 2.a

Write program that asks the user for five numbers and then prints out the average of those numbers. When you run your program, it should match the following format:

Please enter five numbers.-2.45.16.0123.8-19.0The average of those numbers is:22.7

The file must be named: average.cpp. To compile it into an executable file named “average”, enter “g++ average.cpp -o average”. “g++” is the name of the compiler, “average.cpp” is the name of your program, “-o average” says that you want the executable file to be named “average” (you do not have to match the name of your .cpp file). If you don’t use the -o option, then the executable file will be named “a.out”.

Project 2.b

Write program that converts Celsius temperatures to Fahrenheit temperatures. The formula is:

F=95C+32

where F is the Fahrenheit temperature and C is the Celsius temperature. The program should prompt the user to input a Celsius temperature and should display the corresponding Fahrenheit temperature. It should display only the converted temperature without any text (not even a ‘F’). When you run your program, it should match the following format:

Please enter a Celsius temperature.-10.5The equivalent Fahrenheit temperature is:13.1

The file must be named tempConvert.cpp.

Project 2.c

Write program that asks the user for a (integer) number of cents, from 0 to 99, and outputs how many of each type of coin would represent that amount with the fewest total number of coins. When you run your program, it should match the following format:

Please enter an amount in

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp