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