Computer Science, asked by sofiey, 1 day ago

write a C program to take the radius as input and find the area of the circle

Answers

Answered by anindyaadhikari13
2

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

The given co‎de 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:
Answered by kratiagnihotri2007
1

Answer:

Sorry army I don't know the answer

Good morning

How are you ??

Similar questions