No, line
contains the characters that were converted into
integers.
Might as well use them to echo what the user entered.
(You could also use the integer variables, which would be converted back
to characters before echoing.)
Here is a sample run of the modified program:
C:\users\default\JavaLessons>java Discount > discount.out 100 50 C:\users\default\JavaLessons>type discount.out Enter list price in cents: List price:100 Enter discount in percent: Discount:50 Discount Price: 50 C:\users\default\JavaLessons>