Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    please explain what happened.
  2. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    The code is still missing the {}s following the else.
    And there is still a hidden } at the end of a statement.

    The Scanner class has a close() method that the program should call when it is...
  3. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    Does it compile, execute and give the right answer?
    Copying values from L to temp is not necessary. Use the variables: L & M in the following if statements.
    The variable names should be changed...
  4. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    double Final = MaxMethod(FirstNum, SecondNum);
    The value returned by the method is saved in the variable: Final

    BTW method names and variable names should start with lowercase letters
  5. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    A problem I see is that the code does not enclose the statements following the else statement in{}s.
    Another problem is the hidden } at the end of a statement. Hiding }s makes the code hard to read...
  6. Replies
    11
    Views
    1,182

    Re: Check for larger num problem

    Please edit your post and wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.


    Use some logic like an if statement to find the larger sum and return it.
Results 1 to 6 of 6