Code:
#include <stdio.h>
#include <math.h>
float Area(float);
float Circumference(float);
int main ( void )
{
float radius;
float refA;
float refC;
printf("Enter a radius of a circle\n");
scanf ("%f", &radius);
refA = Area(radius);
refC = Circumference(radius);
printf("\nThe Area of the circle is %.2f\n", refA);
printf("\nThe Circumference of the circle is %.2f\n", refC);
return 0;
}
float Area(float radius)
{
return (float) pow(radius, 2) * 3.14;
}
float Circumference(float radius)
{
return (float) 2 * radius * 3.14;
}
Why does my compiler display a conversion warning for...
Code:
return (float) pow(radius, 2) * 3.14;
and...
Code:
return (float) 2 * radius * 3.14;