WAP To Print Area Of A Triangle
#include<iostream.h>
#include<conio.h>
#include<math.h>
Void main()
{ float a,b,c,s,area;
clrscr();
cout<<”Enter the three sides of a
triangle”;
cin>>a>>b>>c;
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)*(s-c));
cout<<”\n”<<”The area of
triangle is”<<area<<”\n”;
getch();
}
Comments
Post a Comment