Computer Science, asked by manvi27, 1 year ago

write a program to calculate the area of triangle by herons formula using ternary operator

Answers

Answered by ani99ket
1
s=a+b+c/2;
area=0;
(a+b>c && b+c>a && c+a>b) ? area=sqrt(s*(s-a)*(s-b)*(s-c)) : alert("invalid inputs");
Similar questions