Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    We're not asking you to find the area of this triangle, so you're using the wrong tool for the job ;-)

  • Custom User Avatar

    vectors are zero-indexed, look at your loop closely ;)

  • Custom User Avatar
    1. You can cout the input to see what you receive.
    2. Your Heron's formula is wrong, here's a correct one:
    p = (a + b + c) / 2
    S = sqrt( p * (p-a) * (p-b) * (p-c) )
    
    1. You're overcomplicating it for yourself (there's a certain very simple rule which let's you know if a, b, and c form a triangle).