Write a C program for Volume and Total Surface Area of a Cone
Program:-
#include <stdio.h>
#include <conio.h>
void main()
{
float V, TSA, r, h, l;
clrscr();
printf("Enter the value of r, h and l");
scanf("%f%f%f",&r,&h,&l);
V=1/3*(3.14*r*r*h);
TSA=(3.14*r*l)+(3.14*r*r);
TSA=(3.14*r*l)+(3.14*r*r);
printf("%f%f", V, TSA);
getch();
}
Output:-
input:-
Enter the value of r, h and l
r=?
h=?
l=?
Enter the value of r, h and l
r=?
h=?
l=?
output:-
...
...
0 comments:
Post a Comment