Home » Sometech » WAP to find area and Circumference of circle using symbolic constant.

WAP to find area and Circumference of circle using symbolic constant.

 #include <stdio.h>

#include <conio.h>

#define PI 3.14159          

void main()

{

                float radius, area,circum;

                clrscr();

                printf(“Enter the radius:”);

                scanf(“%f”, &radius);

                area = PI * radius * radius;

                circum=2*PI*radius;

                printf(“\nThe area of the circle is %f”, area);

                printf(“\nThe circumference of the circle is %f”, circum);

                getch();

}

Advertisements

SoME Tech

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: