Step 1: Start
Step 2: Input value of radius
Step 3: Calculate area ( area = 3.14 * radius * radius )
Step 4: Display value of area
Step 5: Stop.
Flowchart:
#include<stdio.h>
int main()
{
int radius;
int radius;
float PI = 3.14, area;
printf("\n Enter radius of circle: ");
scanf("%d", &radius);
area = PI * radius * radius;
printf("\n Area of circle : %f ", area);
return (0);
}
Output:
Enter radius of circle: 3
Area of circle : 28.260000
No comments:
Post a Comment