A community for students.

    Here's the question you clicked on:

    55 members online
    • 0 replying
    • 0 viewing


    • 2 years ago

    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.

    • This Question is Open
    1. appleduardo
      • 2 years ago
      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].

    2. Ajk
      • 2 years ago
      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.

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

      • Attachments:

    Ask your own question

    Sign Up
    Find more explanations on OpenStudy
    Privacy Policy

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


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