Modified program to output in BCD