Computer Science, asked by jaiswaltanishka984, 16 days ago

Write a program to input the radius of a circle from the user and display its area and perimeter.

Answers

Answered by velox
0

Answer:

#include <stdio.h>

#include <math.h>

#define pi 3.14

int main() {

   float radius,area,perimeter;

   printf("Enter the value of radius: ");

   scanf("%f",&radius);

   area = pi*pow(radius,2);

   printf("The area of the circle is %.2f \n",area);

   perimeter = 2*pi*radius;

   printf("The perimeter of the circle is %.2f",perimeter);

   return 0;

}

Explanation:

This is the program to input the radius of a circle from the user and display its area and perimeter in C language.

Attachments:
Similar questions