/* Define macro */
#include <stdio.h>
#define PI 3.14159f /* Definition of the symbol PI */
void main()
{
float radius = 0.0f;
float diameter = 2.0f;
float circumference = 0.0f;
float area = 0.0f;
radius = diameter/2.0f;
circumference = 2.0f*PI*radius;
area = PI*radius*radius;
printf("\nThe circumference is %.2f", circumference);
printf("\nThe area is %.2f", area);
}
|