// menu options
printf(" Menu of shape details ")
printf ("1.Cube ");
printf ("2.Cuboid ");
printf ("3.Cone ");
printf ("4.Cylinder ");
// console input of option
op = input ("Enter the shape option [1-4]: ");
if (op==1) then
// put the required console input(s)
l=input ("Enter the length of the sides of the cube: ");
printf(" Measuring parameters");
printf (" 1.Surface Area");
printf (" 2.Volume ");
// console input of shape option
op1 = input ("Enter the shape option [1-2]: ");
if(op1==1)then
// calculate area
area=6*l*l;
printf ("Surface Area of cube is : %g sq.unit ",area);
elseif(op1==2) then
// calculate volume
volume=l*l*l;
printf ("Volume of cube is : %g cube unit ",volume);
else
printf("Incorrect option");
end
elseif (op==2) then
// put the required console input(s)
l=input ("Enter the length of the sides of the cuboid : ");
b=input ("Enter the breadth of the sides of the cuboid : ");
h=input ("Enter the height of the sides of the cuboid : ");
printf(" Measuring parameters");
printf (" 1.Surface Area");
printf (" 2.Volume ");
// console input of shape option
op1 = input ("Enter the shape option [1-2]: ");
if(op1==1) then
// calculate area
area=2*(l*b + b*h + l*h);
printf ("Surface Area of cuboid is : %g sq.unit ",area);
elseif(op1==2) then
// calculate volume
volume=l*b*h;
printf ("Volume of cuboid is : %g cube unit ",volume);
else
printf("Incorrect option");
end
elseif (op==3) then
// put the required console input(s)
r=input ("Enter the radius of the cone : ");
h=input ("Enter the height of the cone : ");
printf(" Measuring parameters");
printf (" 1.Surface Area");
printf (" 2.Volume ");
// console input of shape option
op1 = input ("Enter the shape option [1-2]: ");
if(op1==1) then
// calculate area
area=%pi*r*(r+sqrt(h*h + r*r));
printf ("Surface Area of cone is : %g sq.unit ",area);
elseif(op1==2) then
// calculate volume
volume=%pi*r*r*h/3;
printf ("Volume of cone is : %g cube unit ",volume);
else
printf("Incorrect option");
end
elseif (op==4) then
// put the required console input(s)
r=input ("Enter the radius of the cylinder : ");
h=input ("Enter the height of the cy;inder : ");
printf(" Measuring parameters");
printf (" 1.Surface Area");
printf (" 2.Volume ");
// console input of shape option
op1 = input ("Enter the shape option [1-2]: ");
if(op1==1) then
// calculate area
area=2*%pi*r*h + 2*%pi*r*r;
printf ("Surface Area of cylinder is : %g sq.unit ",area);
elseif(op1==2) then
// calculate volume
volume=%pi*r*r*h;
printf ("Volume of cylinder is : %g cube unit ",volume);
else
printf("Incorrect option");
end
else
printf ("Wrong option ");
end
Comment on each line in your code. Part (2): (Continue in the same code) Consider a plot for the Cylinder (Surface area vs radius) wherer is the radius range from 1m to 18m with 0.25m intervals, the height is 21m. Plot the Surface area vs Radius for the corresponding range of radius Ensure that your plot is suitable for technical presentation: Provide a descriptive title of your plot. Label your x and y axes (with units). Change the color of the line to red color