Your challenge is to read a "password" from the keyboard / standard input.
- Read a string
- For each of the characters in
s, print a character
- In realtime.
- You must print
cin realtime. As soon as the user enters a character you must display
cmust be constant, i.e. it must be the same character.
ccan be any visible character (i.e. it cannot be a newline, space, tab, or unprintable).
ccan't be based on
cmust be defined/constant before
cmust be the same every time the program is run.
ccan be one of the characters in
sif by accident, as long as all other rules are followed.
- None of the characters of
smay appear on the screen,
cexcepted (see previous rule).
- You may use any reasonable methods of input and output as long as all other rules are followed.
- You may assume that the length of
sis never longer than the terminal/graphical window width.
- If using a terminal, your program should terminate after a newline or EOF is entered.
*, the output would look something like:
The shortest submission in each language wins.