C Programming

# C Program to Calculate the Area and Circumference of a Circle These are the different ways to calculate the area and circumference of the circle in C programming.

`#include<stdio.h>#include<conio.h>#define pi 3.14void main(){  int r;  float a, c;  printf("ntenter value of radius=");  scanf("%d",&r);  a= pi*r*r;  c=2*pi*r;  printf("tArea = %.2fn",a);  printf("tCircumference = %.2fn",c);  getch();}`

## Output

You can also perform this calculate by defining pi as float value.

## C Code

`#include<stdio.h>#include<conio.h>void main(){  int r;  float a, c;  float pi=3.14;  printf("ntenter value of radius=");  scanf("%d",&r);  a= pi*r*r;  c=2*pi*r;  printf("tArea = %.2fn",a);  printf("tCircumference = %.2fn",c);  getch();}`

## Output

You can also perform this calculation by putting value

## C Code

`#include<stdio.h>#include<conio.h>void main(){  int r;  float a, c;  printf("ntenter value of radius=");  scanf("%d",&r);  a= 3.14*r*r;  c=2*3.14*r;  printf("tArea = %.2fn",a);  printf("tCircumference = %.2fn",c);  getch();}` #### Tuts

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

## You may also like

C Programming

#### Calculate the Factorial by Using Recursion

• January 26, 2016
C Programming

#### C Program to Calculate Factorial Using Function

• January 26, 2016