Search:

Type: Posts; User: jim829

Search: Search took 0.02 seconds.

  1. Thread: Do loop help

    by jim829
    Replies
    5
    Views
    1,196

    Re: Do loop help

    Here is skeleton of what I think you want to do.

    Jim



    boolean val = true;
    while (val) {
    System.out.print("Would you like to play a game?");
    String ans = input.next();
  2. Thread: Do loop help

    by jim829
    Replies
    5
    Views
    1,196

    Re: Do loop help

    Your big loop which does all the processing should be the inner loop. The outer loop is the one which asks if the user wants to repeat the process. So in essence, the outer loop and question/answer...
  3. Thread: Do loop help

    by jim829
    Replies
    5
    Views
    1,196

    Re: Do loop help

    First, your loops won't ever work properly as written:


    do{
    System.out.println("Calculate another loan interest (Yes/No)?");
    }while(input.next().equalsIgnoreCase("yes")&&...
Results 1 to 3 of 3