Answer to Question #213610 in C for a.s.vijay

Question #213610

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


1
Expert's answer
2021-07-04T17:11:38-0400
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS