We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i am using return abs((x1*(y2-y3) + x2*(y3-y1)+ x3*(y1-y2))/2.0); formula to calculate area. when i am executing it in c++ i pass all the test cases, but when i am executing the same thing in java i onli pass test 0 ... Can anyone explain why ? if both program needed i wud give.. :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #102: Triangle containment
You are viewing a single comment's thread. Return to all comments →
i am using return abs((x1*(y2-y3) + x2*(y3-y1)+ x3*(y1-y2))/2.0); formula to calculate area. when i am executing it in c++ i pass all the test cases, but when i am executing the same thing in java i onli pass test 0 ... Can anyone explain why ? if both program needed i wud give.. :)