1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vova2212 [387]
4 years ago
5

Write a program that requests the user for three decimal test scores between 0 and 100. Your program will then find the average

of the two highest scores. You are to use three separate IF statements to determine which score is the smallest. The average is to be formatted to one decimal place.
Computers and Technology
1 answer:
skad [1K]4 years ago
3 0

Answer:

import java.util.Scanner;

public class num9 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter three numbers between 0 and 100");

       double num1 = in.nextDouble();

       double num2 = in.nextDouble();

       double num3 = in.nextDouble();

       double min = 0;

       double sMin = 0;

       double tMin = 0;

       if(num1<num2 && num1<num3){

           min = num1;

           sMin = num2;

           tMin = num3;

       }

       else  if(num2<num1 && num2<num3){

           min = num2;

           sMin = num1;

           tMin = num3;

       }

       else  if(num3<num2 && num3<num1){

           min = num3;

           sMin = num1;

           tMin = num2;

       }

       double average = (sMin+tMin)/2;

       System.out.printf("The average of the two highest scores is:%.1f \n",average);

   }

}

Explanation:

  1. Using Java programming language. The Scanner class is used to receive the three numbers. The user is prompted to enter a valid number between 0 and 100.
  2. Using three IF statements the minimum (min), second largerst (sMin) and the largest (tMin) of the three numbers is determined.
  3. the average of the sMin and tMin is calculated and printed to the console with the printf method to one decimal place.
You might be interested in
The social commerce feature that includes a stream of events to create a history for friends to view​ is/are called​ ___________
lesya692 [45]
<span>The social commerce feature that includes a stream of events to create a history for friends to view​ is called a <u>timeline</u>.
You can see it on Facebook, or any other social media you use - timeline is where you can see what other people are doing, or where they can see what is happening in your life, if you choose to share that with your friends on a social media network of your choice.</span>
4 0
3 years ago
A(n) ________ is a light-sensitive material used to make a chip.
RSB [31]
The photoresist is a light-sensitive material used to make a chip. Photoresists can likewise be uncovered by electron shafts, creating an indistinguishable outcomes from introduction by light. The primary distinction is that while photons are consumed, storing all their vitality without a moment's delay, electrons store their vitality bit by bit, and scramble inside the photoresist amid this procedure.
3 0
4 years ago
What type of hardware enables users to interact with a computer? Check all that apply. the CPU the hard disk drive the keyboard
valentina_108 [34]

Answer:

the keyboard

the monitor

the mouse

Explanation:

just took test

6 0
4 years ago
Read 2 more answers
Match each role to the corresponding web development task.
trapecia [35]

Answer:

1. Art director: selecting color palettes.

2. Web project manager: creating budget spreadsheets.

3. Usability lead: researching target audiences.

4. Developer: coding.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

The various role performed during the web development process (task) includes;

1. Art director: selecting color palettes. This individual is saddled with the responsibility of choosing the color that best fits a website.

2. Web project manager: creating budget spreadsheets. He or she is responsible for performing tasks such as creating a financial (budget) plan, start and finish date (timing), procurement, etc.

3. Usability lead: researching target audiences. This individual is saddled with the responsibility of surveying and collecting data from the demography for which the website is designed.

4. Developer: coding. This is the technical expert referred to as a web developer and is responsible for writing the set of instructions (codes) that enables the website to work properly and serve a purpose.

5 0
3 years ago
We look for trends when we are looking at data. What is a trend?
yulyashka [42]
A subject of what people say at the time, most used, famous at the present time
4 0
3 years ago
Read 2 more answers
Other questions:
  • When using an hdmi to dvi adapter, what two dvi port types will the adapter work with?
    8·1 answer
  • What are three situations when recursion is the only option available to address problems?
    10·1 answer
  • What is illegal to search on the internet?
    5·1 answer
  • A(n) ___________________ process is initiated by individuals who are subjected to forensic techniques with the intention of hidi
    6·1 answer
  • Match the ocean floor feature with its characteristic.
    6·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • The art element line is a moving point.<br><br><br> True or False
    15·1 answer
  • As we move up a energy pyrimad the amount of a energy avaliable to each level of consumers
    10·1 answer
  • Ask the user for five-coordinate pairs. Store each pair as a tuple, and store all the pairs in a list. Print the slope between a
    13·1 answer
  • The. Model has the disadvantage of high project cost due to creation several prototypes
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!