C Programming
Computer Programming

Program in c to find the volume and surface area



Write a Program in c to find the volume and surface area of cube

\* C Program to to find the volume and surface area of cube *\

# include < stdio.h >
int   main( )
{

int   s  ;
float   vol, sa  ;
printf(" Enter the side of cube : ") ;
scanf("%d ", & s) ;
vol = s * s * s  ;
sa = 6 * s * s  ;
printf("\n Volume of cube : ") ;
printf(" %f ",  vol) ;
printf("\n Surface Area of cube : ") ;
printf(" %f ",  sa) ;
return ( 0 ) ;

}

Output of Program:

Output of Program in C to find the volume and surface area of cube