How to find volume of cylinder using function and without arguments?
CODE
How to find volume of cylinder using function and without arguments?
// Write a program to
find volume of cylinder using function and without arguments..
int
main()
{
void vol(); //function declaration
vol(); //function calling
}
void
vol() //function defination
{
float h,r,v;
printf("\n enter radius and
height:");
scanf("%f%f",&r,&h);
v=3.14*r*r*h;
printf("\n volume of
cylinder=%f",v);
}
Output:
enter radius and
height:
5
7
volume of cylinder=549.500000
How to find volume of cylinder using function and without arguments?
Reviewed by Unknown
on
December 31, 2018
Rating:
No comments:
If you have any doubt or query ,comment below: