Search:

Type: Posts; User: CSUTD

Search: Search took 0.11 seconds.

  1. Replies
    7
    Views
    1,632

    Re: Nested loop if statement help

    public static void main(String [] args)
    {
    Scanner keyboard = new Scanner(System.in);

    int num = 0;
    int num_of_rows = 1;

    while(num < 1 || num > 10)...
  2. Replies
    7
    Views
    1,632

    Re: Nested loop if statement help

    Not working, I may have done it wrong.

    I enter 2 it prints out "$$" and the "The number you entered is invalid". Even if I enter 20 it says the same thing. But it doesn't ask for the user to enter...
  3. Replies
    7
    Views
    1,632

    Re: Nested loop if statement help

    Yes, that is correct.

    So, a while loop would be the thing to use?
  4. Replies
    7
    Views
    1,632

    Nested loop if statement help

    Right now my code is generating half of what it is supposed to.

    Program asks the user to enter a number from 1 to 10.

    Enter 7

    output will be $$$$$$$

    I'm having issues with my if...
Results 1 to 4 of 4