Sunday 10 June 2012

code of area of the triangle by using sides


This is the source code of area of the triangle by using sides
#include<iostream.h>
#include<conio.h>
#include<math.h>
 int main()
 {
     float a,b,c,S,Area;
     cout<<"enter the value of first side:";
     cin>>a;
       cout<<"enter the value of second side:";
       cin>>b;
         cout<<"enter the value of third side:";
         cin>>c;
         S=(a+b+c)/2;
         Area=sqrt(S*(S-a)*(S-b)*(S-c));
         cout<<"this is the required area:"<<Area;
         getch();
         }
End

No comments:

Post a Comment