Hi, I've only started this week programing on C++ so my resources are still quite limited, but here's the thing, the code is supposed to calculate the area of any given triangle by using Heron's formula, but sometimes the answer shows the actual result, sometimes it shows "0", and somtimes "Nan", depending on the values you assign.
I.e: 2.2, 3.2, 5.1, shows "2.21897 (actual result).
90, 80, 10: Shows "Area: 0"
and 5, 60, 3: Shows "Area: nan"
Well 5 60 3 couldn't possibly be a triangle because the two short sides wouldn't reach from one end of the long side to the other. And 90 80 10 would be a straight line.
Ahh, I see, So it's just that I was trying random numbers that didn't work in a triangle, awesome then. And I've only started with c++ this week as a hobby, with a pdf tutorial, so I'm trying stuff to see how they work, that's why it's unnecessarily complicated.
Thank you, people.