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