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();
}
No comments:
Post a Comment