#define pi 3.14
float perimeter(float k)
{
float p=2*pi*k;
return p;
}
float area(float k)
{
float a =pi*k*k;
return a;
}
main()
{
float r;
printf("\nEnter radius of cicle:\t\t");
scanf("%f",&r);
printf("Perimeter/circumference :\t%.2f\n",perimeter(r));
printf("Area of the circle is :\t\t%.2f\n\n",area(r));
}
No comments:
Post a Comment