Calculate the area of Ellipse in C++.


 #include<iostream.h>

#include<conio.h>

int main( )

{

int a,b;

float r;

cout<<"enter Axis a:";

cin>>a;

cout<<"enter Axis b:";

cin>>b;

r=3.14159*a*b;

cout<<"Ellipse area is="<<r;

getch( );

return 0;

}

To Run:

















Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com