Output is giving garbage values

my code

Can anyone help me out?