0
Write a function to compute area of triangle. Sides are passed as parameter by the user. Area =sqrt(s*(s-a) *(s-b)*(s-c))
Please tell the answer. Where s=(a+b +c)/2
1 Réponse
0
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int a=5;
int b=4;
int c=6;
float s= float((a+b+c))/2;
float area=sqrt(s*(s-a)*(s-b)*(s-c));
cout <<area;
return 0;
}