Monday, January 30, 2017

C Program to find area and circumference of circle

#include<stdio.h>
 
int main() {
 
   int radius;
   float PI = 3.14, area, circle;
 
   printf("\nEnter radius of circle:- ");
   scanf("%d", &radius);
 
   area = PI * rad * rad;
   printf("\nArea of circle :- %f ", area);
 
   circle = 2 * PI * rad;
   printf("\nCircum. :- %f ", circle);
 
   return (0);
}



OUTPUT

Enter radius of a circle :- 1
Area of circle :- 3.14
Circum.  :- 6.28