#include<iostream> #include<math.h> using namespace std;
int main(){ //variables float aside, bside, cside; //enter side a cout << "enter the length of side a " << endl; cin >> aside; //enter side b cout << "enter the length of side b " << endl; cin >> bside; //enter side c cout << "enter the length of side c " << endl; cin >> cside; if (aside == bside && bside == cside) // all sides equal cout << "Equilateral triangle\n"; else if (aside == bside || aside == cside || bside == cside) // at least 2 sides equal cout << "Isosceles triangle\n"; else // no sides equal cout << "Scalene triangle\n"; float first, second, third; float s, area; cout << endl << "Enter size of each sides of triangle" << endl; cout << "Enter size for First Side ="; cin >> first; cout << "Enter size for Second Side ="; cin >> second; cout << "Enter size for Third Side ="; cin >> third; s = (first + second + third) / 2; area = sqrt(s*(s - first)*(s - second)*(s - third)); cout << "Area of Triangle= " << area << endl; system("pause"); return 0; }