PLEASE EXPLAIN TO UNDERSTAND THIS .
In the first case, when you are dividing d*50 by 1000, its doing an integer division and returns ans in integer. To correct it, just do 1000.0 and it will be correct
1 Like
Thanks a lot Sir