C Program to Calculate Area of a Circle



The formula to calculate the area of circle is π(pi)*r^2. The value of π is equal to 3.14(approx)



  1. //C Program to calculate area of a circle
  2. #include<stdio.h>
  3. int main()
  4. {
  5. float r, area;
  6. printf("Enter radius of the circle: ");
  7. scanf("%f", &r);
  8. area= 3.14*r*r;
  9. printf("Area = %f", area);
  10. return 0;
  11. }

Output


Output!