Code output is fine at one or two compile and run but output auto changed after another compile and run. my code is here,correct output is: