This is a school assignment
Ask the user to enter a number. Print "Nested loops are fun." as many times as the user enters a number. (For example, if the user enters the number 3, write "Nested loops are fun." three times. Ask the user if he wants to have some more fun. If he clicks the YES button, do it all over again. If he clicks the NO button, then say "Bye".
I am having problems connecting the input the user entered to make it loop. My other problem is i dont know what code to enter to make it that when i click no, it will say bye in a dialog box. Below is an attempt of my work. // DO SOMETHING between // DO SOMETHING is my attempt to make it work but i know it is incorrect
Code:int number;
String s;
int option;
do
{
s = JOptionPane.showInputDialog(null, "Enter a number: ");
number = Integer.parseInt(s);
// DO SOMETHING
do
{
if (number <= number) System.out.println("Nested loops are fun.");
number = number + 1;
}while (number < number); // end do while loop
//DO SOMETHING
option = JOptionPane.showConfirmDialog(null, "Want to enter another number?");
} while(option == JOptionPane.YES_OPTION);

