Problem 15

The Forgetful Machine

Ask the user for two words and two numbers, and let the person at the keyboard type in some values, but don’t bother storing their responses into any variables.

Again, there is no need to create any variables, except for the Scanner variable typically named input.

Give me a word!
lorry!
Give me a second word!
deoxyribonucleic? 
 
Great, now your favorite number?
42 
And your second-favorite number...
1 
 
Whew!  Wasn't that fun?

◄ 14: Asking Questions 16: Name, Age, and Salary ►



Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.