I need to get the ratio of 342/556 . I tried with below. double hw_ratio=(double)342.0/556.0 but this gives me wrong answer.(1.6257309941520468)
You've done it the wrong way round.
556/342 = 1.62573.... 342/556 = 0.615107....
2.1m questions
2.1m answers
60 comments
57.0k users