C program to calculate the area of circle from given radius

#include< stdio.h >
#include< conio.h >
void main ()
{
           float radius, area;
          clrscr();
          printf(" Enter the value of radius for a circle : ");
          scanf("%f",&radius);
          area = 3.14 *radius*radius;
          printf("The area of circle is equal to :\t%f",area);
          getch();
}

OUTPUT : 

Enter the value of radius for a circle : 5
The area of circle is equal to : 78.5

No comments :

Post a Comment