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
Atoms may be bonded together by losing, gaining or sharing _____________.
alexandr402 [8]
Nucleons, electrons, and protons i do believe, but if i am wrong please do tell me.
4 0
3 years ago
What is the difference between a learner’s license and an operator’s license?
Allushta [10]
A learner's license does not allow the person to drive without someone else who has their operator's (or driver's license) or an adult who is at least 21. Although this varies depending on the state. 
7 0
3 years ago
Please help
sergey [27]

Answer:

a = 6, b = 0

Explanation:

The loop ran 3 times before b == 0. The statement "while ((b != 0)" is essentially saying: 'While b is not equal to 0, do what's in my loop'. Same general thing with "&& ((a / b) >= 0)". The "&&" is specifying that there should be another loop condition. The final part of the while loop states: 'as long as a ÷ b is greater than 0, do what's in my loop'. If all of these conditions are met, the loop will run. It will continue to run until at least one of the conditions are not met.

<em />

<em>Side note: I can't help but notice you posted the same question a while ago, so I just copied and pasted my previous response with some tweaking here and there. Hope this helps you! :)</em>

8 0
3 years ago
In computing, what does LAN stand for?​
Arlecino [84]

Answer:

LAN stands for Local Area Network

4 0
3 years ago
Read 2 more answers
1. ___________ ensures the integrity and security of data that are passing over a network.
allochka39001 [22]

Answer:

The correct answer to the following question will be Option D (Network-security protocols).

Explanation:

  • Methods and procedures for protecting network data from unwanted information retrieval are managed by network security protocols.
  • They are a network-style protocol that guarantees the protection and privacy of data in transit through a wireless connection. It describes procedures and techniques for protecting network data from every unauthorized effort to access or remove data material.

Therefore, Option D is the right answer.

5 0
4 years ago
Other questions:
  • A ____ paragraph places the first character of a text line near the left border of a placeholder.
    14·1 answer
  • A ________ is a set of rules that governs data communication.
    14·1 answer
  • give 2 reasons why u think that technology will be bigger in the future and why do we need it not for school need your perspecti
    12·2 answers
  • ___ is the technology used by smart phones to send text messages.
    6·1 answer
  • By default, EC2 instances pull SQS messages from an SQS queue on a FIFO basis.
    6·1 answer
  • In PHP, the only way to output text is with echo.
    10·1 answer
  • At Tech Edge Inc., a special team is set up for making a robot capable of assisting blind people in daily activities. The member
    5·1 answer
  • Information has just been sent from a Web form on a client's system to a Web server. Which of the following is required to proce
    14·1 answer
  • A file named loan.html, write an HTML document that looks similar to figure 9-7 in the textbook. Write four functions with these
    8·1 answer
  • What virtual, logically defined device operates at the data link layer to pass frames between nodes?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!