Dear user, please enter a number, and I will compute a multiplication table for you: 7 You typed in 7. Here is the multiplication table: 1 2 3 4 5 6 7 2 4 6 8 10 12 17 3 6 9 12 15 18 21 4 8 12 16 20 24 28 5 10 15 20 25 30 35 6 12 18 24 30 36 42 7 14 21 28 35 42 49 Happy? (y/n)If the user answers n the program should print: Try again.. and terminate. If the user answers y the program should print: Great! now you can try the next problem :) and terminate.
Note: Be careful with the formatting! It should look exactly as above. Assume the size of the table is always smaller than 10. To get the formatting right, you may need to print leading spaces. To print a space use System.out.print(" ").
Now, if the user answers no, then the fun starts. The program should ask Are you sure you don't like Java programming?. If the user answers no, then it should display Hope you'll get to like it soon.. Otherwise, if the user answers yes, it should ask Are you really sure you don't like Java programming?, and repeat. If the user keeps saying yes, then the program keeps asking Are you really really sure you don't like Java programming?, then Are you really really really sure you don't like Java programming?. And so on, every time printing one more really.
This should stop when it reaches the point when it prints really 5 times. At that point, if the user still answers yes, it should print Too bad, and terminate.
Do you like Java programming? [y/n]: n Are you sure you don't like Java programming? [y/n]: y Are you really sure you don't like Java programming? [y/n]: y Are you really really sure you don't like Java programming? [y/n]: n Hope you'll get to olike it soon..
Do you like Java programming? [y/n]: n Are you sure you don't like Java programming? [y/n]: y Are you really sure you don't like Java programming? [y/n]: y Are you really really sure you don't like Java programming? [y/n]: y Are you really really really sure you don't like Java programming? [y/n]: y Are you really really really really sure you don't like Java programming? [y/n]: y Are you really really really really really sure you don't like Java programming? [y/n]: y Too bad..