prev


Getting Input Values From Keyboard

10.Volume of cylinder (23.6.2009)

/*
Program# 10
date : 10-12-2008
Volume of Cyclinder
*/

#include <stdio.h>
main(){
float c,r,p,h;
p=3.14;
printf("\nEnter value for r and h :");
scanf("%f %f",&r,&h);
c=p*(r*r)*h;
printf("\nVolume of cyclinder : %f\n",c);
}

output:
Enter values for r and h : 5 6
Volume of cyclinder : 471.000031

next
blog comments powered by Disqus