Skip to main content
\(\newcommand{\doubler}[1]{2#1} \newcommand{\binary}{\mathtt} \newcommand{\hex}{\mathtt} \newcommand{\octal}{\mathtt} \newcommand{\prog}{\mathtt} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section12.4Programming Exercise


The programs in this Section that read one character from the user showed some odd behavior. When the program ended, there was an extra prompt line in the terminal window. Choose one of the programs and fix it so that no longer occurs.

Hint Solution