In this tutorial, we will be discussing a program to find the area of an Ellipse.
For this, we will be provided with the semi-major axis and semi-minor axis of the Ellipse. Our task is to calculate and print out the area of the given Ellipse.
Example
#include<bits/stdc++.h>
using namespace std;
//finding area of ellipse
void findArea( float a, float b) {
float Area;
Area = 3.142 * a * b ;
cout << "Area: " << Area;
}
int main() {
float a = 5, b = 4;
findArea(a, b);
return 0;
}Output
Area: 62.84