6+ C Programs to Calculate Area of a Circle

This post contains a total of 6+ C Program Examples with Source Code to Calculate the Area of a Circle. All these Circle Area Calculator programs are made using C Language.

You can use the source code of these examples with credits to the original owner.

Related Posts

C PROGRAMS TO CALCULATE AREA OF CIRCLE

1. By Sadhvik Morla

Made by Sadhvik Morla. Simple Program to find the Area of a circle. Source

10
area of circle of radius 10 = 314.159210
#include <stdio.h>
int main()
{
 int r;
 float area;
 scanf("%d",&r);
 area=3.141592*r*r;
 printf("area of circle of radius %d = %f",r,area);
}

2. By Junior Rido

Made by Junior Rido. Write your Circle radius in redius column to get its area. Source

33
The area of circle is 3419.460205
#include <stdio.h>
int main() {

int redius = 33 ;

float ฯ€ = 3.14;

printf ("The area of circle is %f", ฯ€*redius*redius);

    return 0;
}

3. By Sriram Kummari

Made by Sriram Kummari. Basic C Program to Calculate the Area of a Circle. Source

Enter Radius: 40
Area : 5024.00
#include<stdio.h>
int main()
{
  float area,radius;
  printf("Enter Radius:");
  scanf("%f",&radius);
  area=3.14*radius*radius;
  printf("Area : %6.2f",area);
    return (0);
}

4. By Gaurav Gunwant

Made by Gaurav Gunwant. Enter your input circle radius in “r = “. Source

314.000000
#include <stdio.h>

int main() {
int r;
float pi,area;
r=10;
pi=3.14;
area=pi*r*r;
printf("%f",area);
    return 0;
}

5. By Monalisa

Made by Monalisa. This C program calculates the area and the perimeter of a circle. Source

enter the radius 33
area=13068 and perimeter=198
#include <stdio.h>

int area (int);
int cir (int);
extern int pi = 3.141;
int main()
 {
  int r,ar,cr;
  printf ("enter the radius\n") ;
  scanf("%d",&r);
  ar=area(r);
  cr=cir(r);
  printf ("area=%d and perimeter=%d",ar,cr);
    return 0;
}
int area(int r)
{
    int a;
    a=4*pi*r*r;
    return a;
}
int cir (int r)
{
    int p;
    p=2*pi*r;
    return p;
}

6. By partha dutta

Made by partha dutta. Program to find area of a circle and triangle using Function. Source

12
452.160004
#include <stdio.h>
#define PI 3.14
int main() {
    float r,b,h;
    void circle(float *x);
    void triangle(float *y,float *z);
    scanf("%f",&r);
    scanf("%f%f",&b,&h);
    circle(&r);
    triangle(&b,&h);
    return 0;
}
void circle(float *x)
{
    float area1;
    area1=PI*(*x)*(*x);
    printf("%f\n",area1);
}
void triangle(float *y,float *z)
{
    float area2;
    area2=(*y/2)*(*z/2);
    printf("%f\n",area2);
}

7. By Sukanya

Made by Sukanya. Program to find area of circle and rectangle. Source

Enter c for circle or r for rectangle
c
10
The area is 314.000000 ,the circumference is 62.799999
#include <stdio.h>
int main() {
char c,r,a;
float area, circumference,perimeter;
printf("Enter c for circle or r for rectangle\n");
scanf("%c",&a);
if(a=='c')
{
    float radius;
    scanf("%f",&radius);
    area=3.14*radius*radius;
    circumference =2*3.14*radius;
    printf("The area is %f ,the circumference is %f",area,circumference);
}
else if(a=='r')
{
    float l,b;
    scanf("%f %f",&l,&b);
    area=l*b;
    perimeter=2*(l+b);
    printf("The area is %f and perimeter is %f\n",area,perimeter);
}
    return 0;
}