Calculate the volume and area of cube

#include<stdio.h>
main()
{
float side,surface_area,volume;
clrscr();
printf("\n enter the side of cube");
scanf("%f",&side);
surface_area=6*side*side;
volume=side*side*side;
printf("\n surface area of cube=%f",surface_area);
printf("\n volume of cube=%f",volume);
getch();
}

Comments

Post a Comment