![Write a Program in C to find the Area and Circumference Of a Circle Area Circumference Of a Circle , Sumit Kar, Timus Rak](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgEEuiVQujzDYGlv1PMDzDKYb5ozvCbIjo_Mt3FOu_A8h6GVex9UkCglRQEuc0wTKxbm_OgzCSMsAl0xTsTrdYwnZVmL3fFis99MAlE7B7SZTE3u-l8-Yoy14a7zhjLCMXS_y2grkLeaBz/s1600/c-programming-tutorial.jpg)
#include<stdio.h>
#include<conio.h>
#define PI 3.142 /* define value of PI */
void main() /*Main function started here*/
{
float r,a,c; /*Declaration of variable*/
clrscr(); /*Clear the console screen*/
printf("\nEnter the radius of circle:\t");
scanf("%f",&r);
a=PI*r*r; /*Calculating area */
printf("\nThe area of the circle:\t%f",a);
c=2*PI*r; /* Calculating circumference */
printf("\nThe circumference of the circle: %f",c);
getch();
}
0 Comments