C Program To Find Area Of A Circle

C Program To Find Area Of A Circle. If you are looking for C program to calculate area of a circle, here in this tutorial we will help you to learn how to write a program to find area of a circle in C language.

C Program to Find Area of a Circle

Learn how to write a C program to find area of a circle. Writing C Program to finding area of circle can be done using various techniques but here in this program, we show how to write a C program to calculate area of a circle in a proper way.

C Program to Calculate Area of a Circle Source Code

/* C program to calculate area of a circle - AreaOfCircle.C */
#include <stdio.h>
#include <math.h>
#define PI 3.142
 
void main()
{
 //variable declaration
 float radius, area; 
 //asking user to enter the radius of a circle
 printf("Enter the radius of a circle \n");
 //reading user entered radius value to calculate area
 scanf("%f", &radius);
 //logic to find area of a cirlce
 area = PI * pow(radius, 2); //area of a circle formula
 //printing area of a cirlce
 printf("Area of a circle = %5.2f\n", area);
}

C Program to Find Area of a Circle Source Code

/* C program to find area of a circle - AreaOfCircle.C */

#include<stdio.h>
 
int main() 
{
 //variables declaration
 float radius, area;
 //Taking input from user and reading it
 printf("\nEnter the radius of Circle : ");
 scanf("%d", &radius);
 //formula to find area of a circle
 area = 3.14 * radius * radius;
//printing area of a circle
 printf("\nArea of a Circle is: %f", area);
 
 return (0);
}

C Program to Find Area of a Circle Output

Enter the radius of Circle : 15

Area of a Circle is: 706.5

C PROGRAMMING tutorials

  1. C Program to Add Spaces in a String
  2. C Program To Add Digits Of A Number
  3. C Program To Find Leap Year
  4. C Program To Append Data Into A File
  5. C Program to Accept Only Integer Values
  6. C Program To Arrange Numbers In Descending Order
  7. C Program to Add Days to Date
  8. C Program to Add Two Fractions
  9. C Program To Reverse A Number
  10. C Program to Find Maximum and Minimum Numbers
  11. C Program to Read a Text File
  12. C Program to Convert Decimal to Hexadecimal
  13. C Program to Convert Decimal to Binary
  14. C Program to Convert Celsius to Fahrenheit
  15. C Program To Find Absolute Value
  16. Ternary Operator Program in C
  17. C Program For Addition Table Using For Loop
  18. Denomination Program in C
  19. C Program to Print Multiplication Table 
  20. C Program Array with Example

 

Leave a Reply

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