Showing posts with label Program to find area and circumference of circle.. Show all posts
Showing posts with label Program to find area and circumference of circle.. Show all posts

Program to find area and circumference of circle.

2] Program to find area and circumference of circle.
#include<stdio.h>
#include<conio.h>
void main()
{
int r;
float pi=3.14,area,ci;
clrscr();
printf(“enter radius of circle: ”);
scanf(“%d”,&r);
area=pi*r*r;
printf(“area of circle=%f ”,area);
ci=2*pi*r;
printf(“circumference=%f ”,ci);
getch();
}
Output:
enter radius of a circle: 5
area of circle=78.000
circumference=31.4