explaination and steps

Discussion in 'Java' started by ells912@gmail.com, Apr 16, 2008.

  1. Guest

    a. How to write a program that asks the user to enter any number of
    integers that are in the range of 0 to 30 inclusive and count how many
    occurrences of each number are entered. Use a suitable sentinel to
    signal the end of input. Print out only the numbers (with the number
    of occurrences) that were entered one or more times.

    b. In a gymnastics or diving competition, each contestant's score is
    calculated by dropping the lowest and highest scores and then adding
    the remaining scores. Write a program that allows the user to enter
    eight judges' scores and then outputs the point received by the
    contestant. A judge awards point between 1 and 10, with 1 being the
    lowest and 10 being the highest. For example, if the scores are:
    9.2, 9.3, 9.0, 9.9, 9.5, 9.5, 9.6 and 9.8
    the contestant receives a total of 56.9 points.

    For both questions need to use array. Since i am not really good with
    this topic, can somebody explain what is all about?? I am really
    stuck !! thanks.
    , Apr 16, 2008
    #1
    1. Advertising

  2. Jeff Higgins Guest

    ells912 wrote:
    > a. How to write a program?
    > b. Write a program!


    <http://home.earthlink.net/~patricia_shanahan/beginner.html>
    <http://mindprod.com/jgloss/gettingstarted.html>

    > For both questions need to use array.


    <http://xahlee.org/java-a-day/arrays.html>

    > Since i am not really good with
    > this topic, can somebody explain what is all about?? I am really
    > stuck !! thanks.
    Jeff Higgins, Apr 16, 2008
    #2
    1. Advertising

  3. RedGrittyBrick, Apr 16, 2008
    #3
  4. Jeff Higgins Guest

    Jeff Higgins, Apr 16, 2008
    #4
  5. wrote:
    > a. How to write a program that asks the user to enter any number of
    > integers that are in the range of 0 to 30 inclusive and count how many
    > occurrences of each number are entered. Use a suitable sentinel to
    > signal the end of input. Print out only the numbers (with the number
    > of occurrences) that were entered one or more times.
    >
    > b. In a gymnastics or diving competition, each contestant's score is
    > calculated by dropping the lowest and highest scores and then adding
    > the remaining scores. Write a program that allows the user to enter
    > eight judges' scores and then outputs the point received by the
    > contestant. A judge awards point between 1 and 10, with 1 being the
    > lowest and 10 being the highest. For example, if the scores are:
    > 9.2, 9.3, 9.0, 9.9, 9.5, 9.5, 9.6 and 9.8
    > the contestant receives a total of 56.9 points.
    >
    > For both questions need to use array. Since i am not really good with
    > this topic, can somebody explain what is all about?? I am really
    > stuck !! thanks.


    These exercises combine use of arrays with processing user input. If you
    are not already comfortable with at least one of those topics you should
    split the issues.

    To improve your array skills, do each exercise with the input data
    already in an array.

    To learn user input, practice reading single numbers, then groups of
    numbers, and e.g. printing the square of each input.

    If there were earlier exercises for either of these topics, go back over
    them and make sure you really understand them. Programming is a
    cummulative subject - if you do not understand an earlier topic you will
    have a lot of trouble learning later ones.

    Patricia
    Patricia Shanahan, Apr 16, 2008
    #5
  6. Roedy Green Guest

    Roedy Green, Apr 16, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. estafford
    Replies:
    3
    Views:
    369
    estafford
    Aug 22, 2003
  2. baumann@pan
    Replies:
    0
    Views:
    305
    baumann@pan
    May 19, 2005
  3. josh

    in depth explaination...

    josh, Nov 27, 2006, in forum: C++
    Replies:
    8
    Views:
    327
    blangela
    Nov 28, 2006
  4. Drew
    Replies:
    4
    Views:
    296
  5. Replies:
    78
    Views:
    1,434
    David Thompson
    Sep 30, 2007
Loading...

Share This Page