Write a Program in C to find the Area Of a Circle



Area Circumference Of a Circle , Sumit Kar, Timus Rak


#include<stdio.h>  

#include<conio.h>

#define PI 3.142 /* define value of PI */

void main() /*Main function started here*/

{

float r,a,c; /*Declaration of variable*/

clrscr(); /*Clear the console screen*/

printf("\nEnter the radius of circle:\t");

scanf("%f",&r);

a=PI*r*r; /*Calculating area */

printf("\nThe area of the circle:\t%f",a);

c=2*PI*r; /* Calculating circumference */

printf("\nThe circumference of the circle: %f",c);

getch();

}

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