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
zavuch27 [327]
4 years ago
15

Write a program that converts an input grade from 60 to 100 and outputs a converted grade from 0.0 to 4.0. a. Minimum input valu

e is 60, maximum is 100. b. All whole numbers must display as decimals. (0 displays as 0.0 and 3 as 3.0) The solution requires that you create a simple mathematical expression that converts the input value into the output value
Computers and Technology
1 answer:
devlian [24]4 years ago
6 0

Answer:

import java.util.Scanner;

public class num7 {

   public static void main(String[] args) {

      Scanner in = new Scanner(System.in);

       System.out.println("Enter the grade 60-100");

       double grade = in.nextDouble();

       while(grade<60 ||grade>100){

           System.out.println("Enter a valid grade 60-100");

           grade= in.nextDouble();

       }

       double outVal;

       if(grade>=60 && grade<70){

            outVal = 0.0;

       }

       else  if(grade>=70 && grade<80){

           outVal = 1.0;

       }

       else  if(grade>=80 && grade<90){

           outVal = 2.0;

       }

       else if(grade>=90 && grade<100){

           outVal = 3.0;

       }

       else{

           outVal = 4.0;

       }

       System.out.println("The converted grade is: "+outVal);

   }

}

Explanation:

  1. The program is written in Java
  2. User is prompted to enter a grade between 60-100
  3. A while loop is used to validate user input
  4. If/else if/else statements are used to convert the values as required
  5. the output value is stored as a double

You might be interested in
How to turn off new macbook pro when it is frozen 2017
Maksim231197 [3]
To unfreeze the mac book pro, there are two ways :
a. <span>Click the apple logo which is at the top left of the menu bar and then select 'force quit'.
b. Hold down the option, command, and escape buttons and then select 'force quit'. </span>
If all else fails, best option is to hold down the power button on the keyboard till it shuts down.
3 0
4 years ago
Read 2 more answers
For which of the four game elements will you give a detailed description about the challenges that the player will face, such as
vaieri [72.5K]

The four game elements that will give you  a detailed description about the challenges that the player will face is option D: objective.

<h3>What goals does game development have?</h3>

To bring about creativity and originality in task completion and issue solving. to prepare pupils for group collaboration.

Note that giving the player a clear objective gives them something to aim for. Make sure the player can relate to this motivation.

Therefore, The most crucial component of a game can be its objectives, which determine how the game is won or lost, what the player is instructed to perform in-game, and what the player must do to gain optional <em>Achievements</em>.

Learn more about objective from

brainly.com/question/18516671
#SPJ1

3 0
1 year ago
Which of the following correctly describes the reason for quality customer service?
Vera_Pavlovna [14]
The correct answer is C. Keep existing customers and clients
Explanation:
Customer service refers to the interaction with customers and support employees in a company provide to customer to guarantee he or she has the best experience when buying one product or service. A high-quality customer service implies providing complete information to customers, and helping them before, during, and even after their process in buying or looking for information in a company. The main purpose of this is that customers feel the support from employees, and are loyal to the company which means they will go back if they need the same service or products. Thus, the reason for quality customer service is "Keep existing customers and clients".
7 0
3 years ago
The _______ is a small program run by a computer when first powered on. its primary function is to stabilize the machine and dev
tigry1 [53]
Hello <span>TheCelloAlex1645 </span>

Answer: <span>The BIOS is a small program run by a computer when first powered on. its primary function is to stabilize the machine and devices on the motherboard so that the operating system can be loaded and take control of the computer.


Hope this helps
-Chris</span>
3 0
4 years ago
material systems developer typically combines the skills of a programmer with the multitasking expectations of a .
SpyIntel [72]

Explanation:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

The programmer simply does not have to translate the image but he needs to map the objects in some different ways that give it a 3D look. The object is composed of from material instead of simple modeling

8 0
3 years ago
Other questions:
  • If a = 3 and b = a+3 find value of b.
    14·2 answers
  • Hanging out with friends, watching your favorite TV show, and buying a pair of new shoes are all examples of _____ for doing wel
    5·2 answers
  • All of the following are good reasons to attend a cummunity college except
    10·2 answers
  • Write a function in MATLAB that takes as an input a matrix of coefficients for a system of linear equations (A), the solution ve
    15·1 answer
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 14 is greater than the input and
    11·1 answer
  • This inventor made their own fortune. They had little to no help in become one of the first black millionaires. They invented a
    9·1 answer
  • We will extend this idea to streams. Write a function called rle that takes in a stream of data, and returns a corresponding str
    5·1 answer
  • What output is produced by
    10·1 answer
  • What Microsoft feature enables you to represent text as colorful visuals
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!