• anonymous
create a console-based application whose Main() method accepts ten integer values from the user and stores them in an array. Next, create a method that determines and displays the smallest and largest of the ten values. Then, pass the array to the method.
Computer Science
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
  • katieb
I got my questions answered at in under 10 minutes. Go to now for free help!
  • appleduardo
its easy. you can convert it to string so we'll get the lenght of the string var which is going to tell us if it's greater than 10 digits or less than. Then with the foor loop you can store each vealue of the string var[i] in each position of the array[i].
  • anonymous
I'd probably do something like declare a lowest and greatest variable and initially store the first element of the array in the lowest variable and in the greatest variable. Then I'd traverse the array, comparing each successive element against the value currently stored in lowest and greatest. if array[i] < lowest then lowest = array[i] (and something similar for biggest, but comparing greater than). I'm going to assume you are fine with the mechanics of getting the user input into the array (probably some version of a loop and maybe something with a Scanner object if you are in Java) and printing the value of lowest and greatest afterward.

Looking for something else?

Not the answer you are looking for? Search for more explanations.