#include<conio.h>
#include<stdio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int a,b,c,s,sum,area;
cout<<"/n enter the three sides of a triangle ";
cin>>a>>b>>c;
sum=a+b+c;
s= sum/2;
area=s*(s-a)*(s-b)*(s-c);
area=sqrt(area);
cout<<"the area of triangle is"<<"= "<<area;
getch();
}
#include<stdio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int a,b,c,s,sum,area;
cout<<"/n enter the three sides of a triangle ";
cin>>a>>b>>c;
sum=a+b+c;
s= sum/2;
area=s*(s-a)*(s-b)*(s-c);
area=sqrt(area);
cout<<"the area of triangle is"<<"= "<<area;
getch();
}
No comments:
Post a Comment