Friday, October 4, 2013

Program to find the area of a circle and rectangle



#include<conio.h>
#include<stdio.h>
#include<math.h>
int main()
{
float Ac,Ar,r,l,b;
printf("\n enter the radius:");
scanf("%f",&r);
Ac=3.14*r*r;
printf("\n the area of the circle is:%f",Ac);
printf("\n enter the length and breadth of the rectangle:");
scanf("%f%f",&l,&b);
Ar=l*b;
printf("\n the area of the rectengle is:%f",Ar);
getch();
return 0;
}

No comments:

Post a Comment