Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Enter the program below 2 ) Run program using input = 1 . Then, type 1 0 ( radius ) 3 ) Add function for
Enter the program below
Run program using input Then, type radius
Add function for area of square. Then, add function for area of sphere
Test both functions input
Make sure your calculation is accurate
i need to see the out put and please run the program in C
Source code
#include
Function prototypes
int input;
void outputfloat;
float areaOfCircleint radius;
driver code
int main
float result;
int choice, num;
printing menu
printfPress to calculate area of circle
;
printfPress to calculate area of square
;
printfPress to calculate area of sphere
;
printfEnter your choice:
;
taking input
choice input;
switch statement to print output according to the
choice
switch choice
case :
printfEnter radius:
;
num input;
result areaOfCirclenum;
printfArea of circle;
outputresult;
break;
case :
printfEnter side of square:
;
num input;
result num num;
printfArea of square;
outputresult;
break;
case :
printfEnter radius:
;
num input;
result num num;
printfArea of sphere;
outputresult;
break;
default:
printfwrong Input
;
printf
;
return ;
function to take input
int input
int number;
scanfd &number;
return number;
function to print output
void outputfloat number printff number;
Area of a circle
float areaOfCircleint radius
return radiusradius;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started