Outputs the last digit


unable to figure out the error. it displays the last digit