Question: Exercise 1 1 . A: create a C + + program that will calculate the area of a circle and prompt. The program should have

Exercise 11.A: create a C++ program that will calculate the area of a circle and prompt. The program should have the following functions:
One function to collect a radius and return the radius. The radius must be between 1 and 20, otherwise, the program will ask the user to enter another radius. The function only returns a valid radius.
One function to calculate the area of a circle. The formula to calculate the area of the circle is area = PI*radius2
Set PI as a global constant with value 3.1416.
The radius is passed to the function as an argument.
One function to prompt the result as
The area of a circle with radius ___ is _____
Exercise 11.B: create a C++ program that will prompt a random number between -10 and 10, inclusive. The program should have the following functions:
One function that randomly generates and returns a number between -10 and 10, inclusive.
One function that prompts the result as
The random number is _______

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!