Write a program to find the area of a circle by taking radius as input from the user
Answers
Answered by
3
Answer:
STEP 1: Take radius as input from the user using std input. STEP 2: Calculate the area of circle using, area = (3.14)*r*r STEP 3: Print the area to the screen using the std output.
Answered by
2
Answer:
C program:
#include <stdio.h>
#define PI 3.14
int main()
{
int radius;
float area;
printf("Enter radius: \n");
scanf(" %d", &radius);
area = PI *radius *radius:
printf("Area of circle = %f,area);
return 0;
}
Output:
Enter radius:
4
Area of circle = 50.240002
Similar questions
Math,
2 months ago
Political Science,
2 months ago
English,
2 months ago
Math,
5 months ago
English,
5 months ago
English,
11 months ago
Environmental Sciences,
11 months ago