In the following exercises, you are meant to change and add parts to the program in Listing 3.1 to make it perform the suggested actions.
|1:||Instead of printing “Bye Bye!” as the last text on the command console before the program finishes, change the source code so that the program writes “Bye Bye. Have a good day!”|
|2:||Instead of typing a y to have the program print “Hello World!”, have the user type Yes. Have the program inform the user about this by changing line 10.|
|3:||Instead of using the variable name answer to hold the input from the user, change the name to userInput.|
|4:||Let the program print out an additional line under "Bye Bye. Have a good day!" saying "The program is terminating."|
|5:||Declare another variable of type ...|