AREA OF CIRCLE USING C LANGUAGE

Area of a circle in c program

Area of a circle in C Language :

#include<stdio.h>
int main()
{
float pi=3.14;
int r;

printf("Enter the value of r:\n");
scanf("%d",&r);

float area= pi*(r*r);
printf("The Area of cicle is: %f",area);
return 0;

}

Output:

Enter the value of r:
20
The area of cicle is : 1256.000

 

 

 

 

 

 

 

 

 

Add a Comment

Your email address will not be published. Required fields are marked *