Question: #include Problem 2 . Calculating Area, Circumference of Circle Expand the program you wrote for Problem 1 to include circle circumference calculation. The user of
#include Problem Calculating Area, Circumference of
Circle
Expand the program you wrote for Problem to include circle circumference
calculation. The user of your program first enters a radius as before, but your
program then should prompt the user to pick either an area calculation or
circumference. If the user enters a then calculate area, if the user enters a
then calculate circumference. If the user enters any other number, then print an
invalid user input message with the input number.
Input:
The program will ask the user to enter
The radius of circle float variables identified as radius
Then ask user to enter either to calculate Area or to calculate
circumference.
If the user enters any other value an error messages "Invalid user input
message with the input number." must be displayed, and the program ends.
Output:
The output must be formatted as below:
Enter the radius of the circle:
Radius entered is:
Enter for area or for circunference:
The area of the circle s:
Enter the radius of the circle:
Radius entered is: e@
Enter for area or for circunference:
The circunference of the circle is:
Enter the radius of the circle:
Radius entered is:
Enter for area or for circunference:,
Irvalid user input:
Topics covered: Basic C printfscanf Expression evaluation Chapter
Test your code before submitting
Remember to compile your code and fix any errors.
Then test it if it passes all tests, then you can submit by selecting the option "mark
as complete".
Test
Test User Choice calculate area
#include
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
