a) Make a program to find the diameter d=2r and area=4Πr2 or 4 pie r square of the sphere. Value of ‘r’ should be defined by the user.
Expert's answer
#include<stdio.h>#include<math.h>intmain(){
float r;
float d;
float S;
printf("Please, enter the radius of the sphere: ");scanf("%f", &r);
d=2*r;
S=4*3.14*pow(r,2);
printf("\nDiameter Of the sphere is: %g", d);
printf("\nArea Of the sphere is: %g", S);
}
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot