Code In Tech - The Ultimate World of Computer Technology

Sunday 25 March 2012

C program to Find area and circumferance of circle

SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#define pi 3.14
void main()
{
 float a,c,r;
 clrscr();
 printf("enter value of radius :");
 scanf("%f",&r);
 a=pi*r*r;

 c=2*pi*r;
 printf("area of circle is %f\ncircumferance of circle is %f",a,c);
 getch();
}

No comments :

Post a Comment