Find Area and Circumference of a Circle

#include<stdio.h>
#define PI 3.142

void main()
{
float r,a,c;
printf("\nEnter the radius of circle:\t");
scanf("%f",&r);
a=PI*r*r;
printf("\nThe area of the circle:\t%f",a);
c=2*PI*r;
printf("\nThe circumference of the circle: %f",c);
}
  

Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C