Im gettinf nums as empty string after spilting
ie if n=2345.65 then s="2345.65"
but nums becomes []
so cant take nums[1]......
exception arrayindexoutofbound
Im gettinf nums as empty string after spilting
ie if n=2345.65 then s="2345.65"
but nums becomes []
so cant take nums[1]......
exception arrayindexoutofbound
@shiniskumar
As you mentioned it has problem when asked for 35 it gives 34 sort off
and also the splitting method gives problem like if we have 3.04 so the output will be 4 and if its 3.40 even now the output will be 4
the method i mentioned above gives correct output like 04 or 40