- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Program to find the Area of an Ellipse in C++
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
Advertisements