10. /* To find the perimeter and area of a circle */
/* Area of a circle with radius 'r' is PI*r*r and Perimeter is 2*PI*r */
main()
{
float r,PI;
PI=3.14;
clrscr();
printf("Enter the radius of the circle -> ");
scanf("%f",&r);
printf("\nThe area is %7.2f and perimeter is %7.2f",PI*r*r,2*PI*r);
getch();
}
No comments:
Post a Comment