Computer Science, asked by sofiey, 1 month ago

write a C program to take the radius as input and find the area of the circle
please any of one help me it's argent please​

Answers

Answered by anindyaadhikari13
1

\texttt{\textsf{\large{\underline{Solution}:}}}

The given program is written in C.

#include <stdio.h>

int main() {

  float pi=3.14,rad,area;

  printf("Enter radius: ");

  scanf("%f",&rad);

  area=pi*rad*rad;

  printf("Area of the circle is: %0.4f",area);

  return 0;

}

\texttt{\textsf{\large{\underline{Logic}:}}}

  • Define pi = 3.14
  • Take the radius as input.
  • Calculate area using formula.
  • Display the area of the circle.

See the attachment for output.

Attachments:
Similar questions