Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Calculate the area of a circle and modify the same program to calculate the volume of a cylinder given its radius and height.

#include<stdio.h>
int main()
{
	
	float vol,r,h;
	printf("enter radius: ");
	scanf("%f",&r);
	printf("enter height: ");
	scanf("%f",&h);
   
	vol=(22*r*r*h)/7;
	printf("VOC: %f
",vol);
	return 0;
}
Source by javatutoring.com #
 
PREVIOUS NEXT
Tagged: #Calculate #area #circle #modify #program #calculate #volume #cylinder #radius
ADD COMMENT
Topic
Name
2+9 =