Question #213610

Write a C program to find the area of circle using preprocessor directives.


Expert's answer

#include <stdio.h>
#define PI 3.142


int main(){
  float rad, area;
  printf("Radius: ");
  scanf("%f", &rad);
  area = PI * rad * rad;
  printf("%f\n", area);
  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS