Please help me. In this question  a,b,c are legs of the triangle. 
And I want to find area of the triangle.
 
       s=(a+b+c)/2
       Area=s*((s-a)(s-b)(s-c)) ^ (1/2)
 
I wrote the programme, could you please correct my programme.

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
  int value;
  int s,area,a,b,c;

  cout<<"Enter your distance for a"<<endl;
  cin>>a;
  cout<<"Enter your distance for b"<<endl;
  cin>>b;
  cout<<"Enter your distance for c"<<endl;
  cin>>c;

  s=(a+b+c)/2;
  cout<<"The value of s is="<<s<<endl;

  area=sqrt(pow(s*(s-a)(s-b)(s-c)),1/2);

  cout<<"The area is ="<<area<<endl;
  return 0;
}

Reply via email to