#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
int radius;
float apothem,perimeter,area,base,height;
cout<<"________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<" TO FIND THE AREA OF CIRCLE :"<<endl;
cout<<"\nEnter the radius of circle:"<<ends;
cin>>radius;
area = 3.14*radius*radius;
cout<<"\n Area of circle: "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF TRIANGLE:"<<endl;
cout<<"\nEnter the base: ";
cin>>base;
cout<<"\nEnter the haight: ";
cin>>height;
area=0.5*base*height;
cout<<"\nArea of triangle : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF EQULATERAL TRIAGLE:"<<endl;
cout<<"Length of side is : ";
cin>>base;
area=(float)(sqrt(3)*(base*base))/4;
cout<<"\nArea of Equilateral Triangle is : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF RECTANGLE :"<<endl;
cout<<"\nEnter the length of rectangle :";
cin>>base;
cout<<"\nEnter the breadth of rectangle :";
cin>>height;
area=base*height;
cout<<"\nArea of rectangle is :"<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF SQUARE :"<<endl;
cout<<"\nEnter the side of square :";
cin>>base;
area=base*base;
cout<<"\nArea of square is :"<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF RHOMBUS :"<<endl;
cout<<"\nEnter the values of diagonal :"<<ends;
cin>>base>>height;
area=(base*height)/2;
cout<<"\nArea of rhombus is : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF PENTAGON :"<<endl;
cout<<"\nEnter the length of side of pentagon :";
cin>>base;
area=(sqrt(5*(5+2*sqrt(5))) * (base*base))/4;
cout<<"\nArea of Regular pentagon is : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF HEXAGON :"<<endl;
cout<<"\nEnter the length of side of hexagon : ";
cin>>base;
area=(3*sqrt(3)*base*base)/2;
cout<<"\nArea of Regular hexagon is : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF HEPTAGON :"<<endl;
cout<<"\nEnter the value of side of heptagon :";
cin>>base;
cout<<"\nEnter the value of apothem :";
cin>>apothem;
perimeter=7*base;
area=(perimeter*apothem)/2;
cout<<"\nArea of Regular heptagon : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF OCTAGON :"<<endl;
cout<<"\nEnter the length of side of octagon : ";
cin>>base;
area=2*(1+sqrt(2))*base*base;
cout<<"\n Area of octagon is : "<<area;
getch();
cout<<"\n________________________________________________________________________"<<endl;
cout<<"________________________________________________________________________"<<endl;
cout<<"\n\n TO FIND THE AREA OF TRAPEZOID :"<<endl;
cout<<"\nEnter the value of bases : "<<endl;
cin>>base>>radius;
cout<<"\nEnter the value of height : ";
cin>>height;
area=(float)((base*radius)*height)/2;
cout<<"\nArea of Trapezoid is :"<<area;
getch();
cout<<"\n............................END............................................";
return 0;
}
No comments:
Post a Comment