For programmers, testers and tech geeks

Area of triangle using C++

#include<iostream>
#include<conio.h>
#include<cmath>
using namespace std;
void main()
{
    float a,b,c,s,A;
    cout<<"Enter sides of triangle =";
    cin>>a>>b>>c;
    s=(a+b+c)/2;
    A=sqrt(s*(s-a)*(s-b)*(s-c));
        cout<<"Sum of sides of triangle ="<<s<<endl;
        cout<<"Area of triangle ="<<A<<endl;
    getch();
}