C Program to find Area and Perimeter of a Circle


Algorithm:-

1.Start
2.Accept the radius of the circle
3.Perimeter = 2*3.14*radius
4.Area = 3.14*radius*radius
5.Print the Area and Perimeter
6.Stop

Program:-

#include<stdio.h>
#include<conio.h>
void main()
{
float peri,area,r;
printf("\n Enter the radius of the circle \n");
scanf("%f",&r);
peri=2*3.14*r;
area=3.14*r*r;
printf("Perimeter = %5.2f \nArea = %5.2f",peri,area);
getch();
}

For more C programs - click here

Popular posts from this blog