C Program to Find Area and Circumference of Circle


Program


#include<stdio.h>
#include<conio.h>

#define PI 3.141592

int main()
{
	float radius, area, circum;
	clrscr(); // Clears the screen
	printf("Enter radius of circle: ");
	scanf("%f", &radius);
	area = PI*radius*radius;
	circum = 2*PI*r;
	printf("Area = %f\n",area);
	printf("Circumference = %f",circum);
	getch(); // Holds the output
	
	return 0;
}

Output of the above program :

Enter radius of circle: 5 ↲ 
Area = 78.539800
Circumference = 31.415920


Note: ↲ indicates ENTER is pressed.