/*
Accept the dimensions of a cylinder and print the surface area and the volume using C
*/
#include<stdio.h>
main()
main()
{
int r,h;
float sa,v;
printf("Enter r,h - ");
scanf("%d%d",&r,&h);
sa=2*(3.14)*r*(r+h);
printf("Surface Area = %f",sa);
v=(3.14)*r*r*h;
printf(" Volume=%f",v);
}
No comments:
Post a Comment