thanks for all especially to Boldra and Khen1950fx,
i'm able to get the right result by changing this code from
May i know what is the difference with above code?
as i manually test it for the 1st code,it seem to output the same input when i enter the input.
and for 2nd code, i will get the right output=123.1.34.107
when i enter any input.