alogarithm for area of circle
Answers
Answered by
1
Answer:
Input to the algorithm
Radius r of the circle
Expected output
Area of circle
Algorithm
Step 1: Start
Step 2: Read\input the radius r of the circle
Step 3: Area PI*r*r// calculation of the area
Step 4: Print area
Step 5: End
Answered by
0
Hello !!
You did don't specify the language of programation for the algorithm. So, I make in C language.
In C language.
_________________
#include <stdio.h>
#include <conio.h>
float main(void)
{
float r,A,pi;
printf("Put the radius:");
scanf("%f",&r);
printf("Put the value of pi(example:3.1415...):");
scanf("%f",&pi);
A = pi*(pow(r,2));
printf("The area is approx:%0.4f",A);
return 0;
}
________________
[See a example in attachment].
I hope I have collaborated !
Attachments:
Similar questions