Area of Circle

Wednesday, 7 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
float area(float);
float r,a;
clrscr();
printf("Enter the radius\n");
scanf("%f",&r);
a=area(r);
printf("Radius=%f\tArea=%f\n",r,a);
getch();
}
float area(float r)
{
float t;
t=3.14*r*r;
return t;
}


OUTPUT:


Enter the radius
5
Radius=5.000000  Area=78.500000
                                                                                                                        
               





No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading