write a program to find the area and perimeter of


Write a program to find the area and perimeter of a circle of given radius

# include

void main()

{

float radius, area, perimeter, pi=3.14;

printf("\nEnter the radius of the circle :\>");

scanf("%f",&radius);

area=pi*radius*radius; 

/* Area of a circle=Pr2*/

perimeter=2*pi*radius;

/* Area of a circle=2Pr*/ printf("\nThe area of the circle is :%.2f",area);

printf("\nThe perimeter of the circle is :%.2f\n",perimeter);

/* "%.2f" - prints values upto 2 decimal places*/

getch();

}

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: write a program to find the area and perimeter of
Reference No:- TGS0305458

Expected delivery within 24 Hours