Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

mtowfeless Group Title

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.

  • one year ago
  • one year ago

  • This Question is Open
  1. appleduardo Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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].

    • one year ago
  2. Ajk Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.