Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    7
    Views
    1,303

    Re: Help with exercise.

    Look at the tutorials:
    Assignment, Arithmetic, and Unary Operators (The Java™ Tutorials > Learning the Java Language > Language Basics)

    also ask google
  2. Replies
    7
    Views
    1,303

    Re: Help with exercise.

    There is a shortcut operator (+=) that you can use to add one variable to another:
    theTotal += aDetail;
    instead of
    theTotal = theTotal + aDetail;
  3. Replies
    7
    Views
    1,303

    Re: Help with exercise.

    Define a separate variable to hold the sum of the numbers.
    Add each number that is read to that variable.
Results 1 to 3 of 3