Reference no: EM13941515
The number format in one decimal place to make this to round the average score to one decimal in this program.
////////////////////////////////////////////////
import java.util.Scanner;
public class TestScoreApp
{
public static void main(String[] args)
{
// display operational messages
System.out.println("Please enter test scores that range from 0 to 100.");
System.out.println("To end the program enter 999.");
System.out.println(); // print a blank line
// initialize variables and create a Scanner object
double scoreTotal = 0;
int scoreCount = 0;
int testScore = 0;
Scanner sc = new Scanner(System.in);
// get a series of test scores from the user
while (testScore <= 100)
{
// get the input from the user
System.out.print("Enter score: ");
testScore = sc.nextInt();
// accumulate score count and score total
if (testScore <= 100)
{
scoreCount = scoreCount + 1;
scoreTotal = scoreTotal + testScore;
}
}
// display the score count, score total, and average score
double averageScore = scoreTotal / scoreCount;
String message = "n" +
"Score count: " + scoreCount + "n"
+ "Score total: " + scoreTotal + "n"
+ "Average score: " + averageScore + "n";
System.out.println(message);
}
}
Find of significant value in helping understanding concepts
: How has your perspective about the different types of early juvenile institutions changed during these years? How have your impressions of the core components of the early juvenile institutions changed since the beginning of the week?
|
The annuitys first payment occurs six years
: What is the value today of a 15-year annuity that pays $580 a year? The annuity’s first payment occurs six years from today. The annual interest rate is 10 percent for Years 1 through 5, and 12 percent thereafter.
|
Business or business to consumer sectors
: Select a small firm 'START UP' of your choice in the business to business or business to consumer sectors' and present it as a case study in the form of a written report in the form of a business plan. Cover the nature of the business start-up, th..
|
How much overhead cost is allocated
: How much overhead cost is allocated to the Supervising activity cost pool under activity-based costing?
|
Round the average score to one decimal
: The number format in one decimal place to make this to round the average score to one decimal in this program.
|
A car is traveling at 70 kmh it then uniformly decelerates
: A car is traveling at 70 km/h. it then uniformly decelerates to a complete stop in 12 seconds. Find its acceleration (in m/s2)
|
What is the variance and expected return of the portfolio
: Consider the following information: Rate of Return if State Occurs State of Probability of Economy State of Economy Stock A Stock B Stock C Boom 0.15 0.40 0.50 0.30 Good 0.60 0.16 0.10 0.09 Poor 0.20 − 0.02 − 0.05 − 0.03 Bust 0.05 − 0.18 − 0.25 − 0.1..
|
Thorough review of the extant literature
: Investigate and prepare a detailed, yet succinct report, which demonstrates a thorough review of the extant literature. It should identify and assess the key contributions by scholars in that topic.
|
What are the articles of confederation and the constitution
: Draw a conclusion about the ideals stated in the Declaration. Are they still pertinent? Which has the greater ability to accomplish them- - a distant national government funded by all Americans, or a closer state government, responsive to its popu..
|