Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following function header: float calcTotal ( float num 1 , int type ) a . What is the name of the function b

Given the following function header: float calcTotal(float num1, int type)
a. What is the name of the function
b. What type of value is returned by the function
c. What types of values are passed to the function
Indicate which of the following is a function prototype, a function header, or the function call.
1 void showNum(double num)
2 void showNum (double);
3 showNum(num);
Write a function named calcArea that is passed a circle's radius as a float. The function should calculate the area of the circle given the formula: A=r2.
A. Write the function main that inputs the radius and then calls the function calcArea. Use a function prototype for the function.
B. Write a displayOutput function that displays the radius and the area of the circle.
Write a while loop that will input 50 numbers and add them up.
Rewrite this loop as a for loop
A program accepts two real numbers and a select code entered by the user. If the select code is 1, the program should add the two numbers and display the result, if the select code is 2, the program should subtract the two numbers and display the result, and if the select code is 3, the program should multiply the two numbers and display the result. If the select code is not 1,2, or 3, an error message should be displayed.
Draw the flowchart and write the nested if statement that does the above.
Hint: You need to use else ifs.
image text in transcribed

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

Recommended Textbook for

More Books

Students also viewed these Databases questions