Irene Wang

Greenhorn

Posts: 3

posted 10 years ago

I'm in an Introduction to Java course online. One of my recent assignments is this:

Ask and get 13 scores (integers between and including 0 and 100).

Display the arithmetic mean (average) on one line. Display the number of

As, Bs, etc. using a 90, 80, 70, etc. grading scale. Display the range of

the numbers as well. Range is defined as the largest number minus the

smallest number plus one.

I've got everything down except for the last part about the range. I don't get how to find out which integers are the largest and smallest without going through a bunch of ifs, else ifs, and elses. I know there's a way using array, but we haven't learned that yet. Is there any other method? I'm going nuts here.

Ask and get 13 scores (integers between and including 0 and 100).

Display the arithmetic mean (average) on one line. Display the number of

As, Bs, etc. using a 90, 80, 70, etc. grading scale. Display the range of

the numbers as well. Range is defined as the largest number minus the

smallest number plus one.

I've got everything down except for the last part about the range. I don't get how to find out which integers are the largest and smallest without going through a bunch of ifs, else ifs, and elses. I know there's a way using array, but we haven't learned that yet. Is there any other method? I'm going nuts here.

pete stein

Bartender

Posts: 1561

Irene Wang

Greenhorn

Posts: 3

pete stein

Bartender

Posts: 1561