Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*******************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE*********** The formula for converting a temperature

*******************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE***********

image text in transcribed

The formula for converting a temperature from Fahrenheit to Celsius is C=95(F32) where F is the Fahrenheit temperature and C is the Celsius temperature. Write a function named cel sius that accepts a Fahrenheit temperature as an argument. The function should return the temperature, converted to Celsius. Demonstrate the function by calling it in a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their Celsius equivalents. EX#5 Write a function named coinToss that simulates the tossing of a coin. When you call the function, it should generate a random number in the range of 1 through 2 . If the random number is 1 , the function should display "heads." If the random number is 2 , the function should display "tails." Demonstrate the function in a program that asks the user how many times the coin should be tossed, then simulates the tossing of the coin that number of times. EX \#6 Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: - void getscore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five scores to be entered. - void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores. - int findlowest () should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or bigher than 100

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions