Question: write two functions that return the volume and weight of a disc. use the main function EXACTLY as below. volume of a disc=((3.142*diameter*diameter)/4)*thickness. weight of

write two functions that return the volume and weight of a disc. use the main function EXACTLY as below.
volume of a disc=((3.142*diameter*diameter)/4)*thickness.
weight of a disc=volume*density of the disc
#include
float disc_vol(float,float);
float dist_wt(float,float);
int main ()
{
float dia, thickness, density vol, wt;
printf("enter the diameter of the disc ");
scanf("%f",&dia);
printf("enter the thickness of the disc ");
scanf("%f", &thickness);
printf("enter the density of the disc ");
scanf("%f",&density);
vol = dis_vol(dia,thickness);
wt=disc_wt(vol,density);
printf("The volume of the disc is %f ", vol);
printf("the weight of the disc is %f ",wt);
printf("bye ");
}
sample output that you can check against
enter the diameter of the disc
5
enter the thickness of the disc
3
enter the density of the disc
3.8
the volume of the disc is 58.9124
the weight of the disc 223.867
bye
I need to write the functions below and make sure they're working ...what are the correct functions ?

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!