Problem Analysis:
The problem is to calculate the area of the ellipse having parameters minor axis(a) and major axis(b).The output is to display the area of the ellipse.Here PI should be defined.
To calculate the area of the ellipse we use the formula.
i.e Area = PI *a *b;
Input variables processing variables output variables necessary header files
a (int) Area= PI *a *b Area(float) conio.h
b(int) stdio.h
define PI 3.14
Algorithms;
1.start
2.Define PI value
i.e. define PI 3.14
3.Input the minor and major axis as a and b.Assign as i.e. int a,b;
4.Use the formula to calculate the area of the ellipse.
i.e. Area= PI *a *b
5. Print the area
6.End
Flowchart:
fig; Flow chart to print the area of the ellipse.
Codes;
Outputs;
Compiling , Debugging and Testings
Enter a and b: 4 6
Area of the ellipse 75.360000