Write a program that does the following: Reads an integer from the user that represents the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that does the following: Reads an integer from the user that represents the number of the students in a class. • Reads the scores of the students from the user and stores them in an array. • Calculates and prints the average of the students with a passing grade (above or equal to 60). Hints: • Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade. Sample run 1: Enter the number of students in the class: 3 Enter the scores of 3 students: 90 80 40 The average of the students with a passing grade is 85.0 Sample run 2: Enter the number of students in the class: 5 Enter the scores of 5 students: 90 80 40 60 70 The average of the students with a passing grade is 75.0 Page 3 of 7 Write a program that does the following: Reads an integer from the user that represents the number of the students in a class. • Reads the scores of the students from the user and stores them in an array. • Calculates and prints the average of the students with a passing grade (above or equal to 60). Hints: • Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade. Sample run 1: Enter the number of students in the class: 3 Enter the scores of 3 students: 90 80 40 The average of the students with a passing grade is 85.0 Sample run 2: Enter the number of students in the class: 5 Enter the scores of 5 students: 90 80 40 60 70 The average of the students with a passing grade is 75.0 Page 3 of 7
Expert Answer:
Answer rating: 100% (QA)
Java program import javautilScanner public class Main public static void mainString args declare som... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The following list represents the number of absent students from my last nine statistics classes: 2 4 0 1 6 1 3 2 3 a. Calculate the range. b. Calculate the variance. c. Calculate the standard...
-
Write a program that simulates stable storage. Use two large fixed-length files on your disk to simulate the two disks.
-
Write a program that takes integers from the user one at a time. Assume the input is some number of positive integers. The user will type in 0 to end the input and the 0 should not be counted as...
-
Instructions: Read the footnotes included in the financial statements for H & B Bakery, then answer the following questions. *The exact requirement of this question, is to read the statements below...
-
On April 1, Keystone Applications paid $ 500,000 to acquire a patent on software. Keystone Application expects the patent to have a useful life of five years. Journalize the entry to record the...
-
A loan officer compares the interest rates for 48-month fixed-rate auto loans and 48-month variable-rate auto loans. Two indeendent1 random samples of auto loan rates are selected. A sample of eight...
-
What is the difference between the operations of a class and its attributes?
-
Why are value-added activities defined from a customer viewpoint?
-
Given points A(6,-2,1) B(0,5,6) and C(-3,-5,2) a) Find the vector equation of the line through A and B b) Find the distance from point C to line in part a) c) Determine the scalar equation of the...
-
Managers often assume a strictly linear relationship between cost and the level of activity. Under what conditions would this be a valid or invalid assumption?
-
Write a paper on Salvador Dali-genius or madman? Give examples.
-
Concord Company issued $6,400,000 of 6%, 10-year bonds on January 1, 2020, for $5,760,000 to yield an effective annual rate of 9%. The effective-interest method of amortization is to be used....
-
What distinguishes a profit center from a cost center? a . Profit centers have revenues and expenses b . Profit centers have personnel costs c . Cost centers are on the second floor d . Profit...
-
You have just received a government's stimulus check in the amount of $1,200 and you decided to save it all up in an investment account getting an average of 9% return yearly in the next 35 years and...
-
Macmillan Learning For the given estate sizes, use constrained equal losses for a bankruptcy problem for creditors 1, 2, 3, and 4 who are owed $100, $200, $300, and $400, respectively. a. an estate...
-
Question 20 This question: 4 point(s) possible Ten years ago, a corporation purchased a building for $180,000. At that time, the corporation felt that the building was worth $205,000. The current...
-
Question 1 (1 mark) Which statement is NOT true about NoSQL databases? (a) MongoDB is an example of NoSQL databases (b) Document-based databases support data schema and constraints similarly to RDBMS...
-
An annual report of The Campbell Soup Company reported on its income statement $2.4 million as equity in earnings of affiliates. Journalize the entry that Campbell would have made to record this...
-
Assume that the number of miles a particular brand of tire lasts before it needs to be replaced follows a normal distribution with a mean of 45,600 miles and a standard deviation of 5,800 miles. a....
-
Budget shortfalls in many states during the most recent recession placed a strain on education resources. One area that receives much attention from both parents and administrators is the number of...
-
The Excel file titled states. xlsx contains the median income in 2011 for all 50 states and the District of Columbia. a. Use Excel to draw a simple random sample consisting of four states, and then...
-
solve the given problem using PSO method \[f(X)=1200\left(2 x_{1} x_{3}+2 x_{2} x_{3} ight)+2500 x_{1} x_{2}+500\left(\frac{1000}{x_{1} x_{2} x_{3}} ight)+100\left(\frac{1000}{10 x_{1} x_{2} x_{3}}...
-
Show 3 iterations for solving the problem below \[\min f(X)=-12 x_{1}-7 x_{2}+x_{2}^{2}\] subject to $-2 x_{1}^{4}-x_{2}+2=0$ \[0 \leq x_{1} \leq 3,0 \leq x_{2} \leq 3\]
-
Solve the optimization problem using SA \[\min f(X)=100\left(x_{1}^{2}+x_{2} ight)^{2}+\left(1-x_{1} ight)^{2}\] subject to $X \in[0,7]$
Study smarter with the SolutionInn App