Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following program prompts the user to enter the temperatures in three cities (see output below). o Only one function is used to get all

image text in transcribed
The following program prompts the user to enter the temperatures in three cities (see output below). o Only one function is used to get all three values. o The average temperature of all three cities is displayed on the screen. Create a new project and name it: HW_1b Create a new file and name it: The following 3 functions are called in main0: o getTemps0 - The following 3 functions ar cat maincpp . The function prompts the user to enter three temperatures. . The numbers are read and assigned to variables. . The function is a void-returning function. o calcAvg0 . The function calculates the average temperature of the three cities. . The value is returned to main0. displayAvg() . The function displays the information on the screen. (see output) Enter temperatures of 3 cities. #1: 77.5 #2: 82.5 #3 : 71.0 getTemps function The average temperature is 77.0 degrees. displavAva function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions