Question: 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
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
