Question :
if lengths of three sides of the triangle are input through the keyboard ,write a program to find the area of the triangle .
SCREENSHOTS
SOURCE CODE
#include <iostream>
#include<conio.h>
#include <math.h>
using namespace std;
int main()
{
int a,b,c ;
float area;
cout <<"Enter 3 sides of triangle : \n";
cin>>a>>b>>c;
area=sqrt(pow(((4*a*a*b*b)-((a*a)+(b*b)-(c*c))),2))/4;
cout<<area;
}
No comments:
Post a Comment