Saturday, 14 January 2012

Program To Find Area of Traingle In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
float a,b,c,s,area;
cout<<"Enter first number=";
cin>>a;
cout<<"Enter second number=";
cin>>b;
s=(a+b+c/2);
area=sqrt(s*(s-a)*(s-b)*(s-c));
cout<<s<<endl;
cout<<area;
getch();
}

No comments:

Post a Comment