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
Vadim26 [7]
3 years ago
12

Write a program that checks whether a positive number given by an input from the user is greater than 5 and less than 20 with ja

va in eclipse. Output the result.
Computers and Technology
1 answer:
Alona [7]3 years ago
5 0

Answer:

Program written in Java is as follows

See comments for explanations

import java.util.Scanner;

public class CheckRange {

public static void main (String [] args)

{

// This line allows the program accept user input

Scanner input = new Scanner(System.in);

//This line declares variable for user input

int num;

//This line prompts user for input

System.out.print("Number: ");

//This line gets user input

num = input.nextInt();

/* The following if statement checks if the user input is greater than 5 and less than 20 */

if (num > 5 && num <= 20)

{

/* This line is executed if the above condition is true */

System.out.print(num+" is greater than 5 and less than 20");

}

else

{

/*If the condition is not true, this line is executed*/

System.out.print(num+" is not within specified range");

}

// The if condition ends here

}

}

You might be interested in
________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
BartSMP [9]

Answer:

The correct answer to the following question will be Option C (Embedded).

Explanation:

  • An embedded system seems to be a monitoring system that incorporates a computer processor, device storage, and peripheral output/input devices that have a particular function within such a larger electrical or mechanical network.
  • Such devices are chips that are designed specifically and live within other devices or appliances.

The other three solutions can not perform tasks like the embedded computers do or even any other computer can implement the computer's processor. Therefore, it's the right answer.

3 0
3 years ago
Read 2 more answers
Given an object context for an Entity Data Model named mmaBooks, which of the following statements would you use to add a Custom
ehidna [41]

Answer:

"mmaBooks.Customers.Add(customer);" is a correct answer for the above question.

Explanation:

Missing information : The correct answer is missing in the question which is defined in the answer part.

  • If a user wants to add any objects to any collection in the C# programming, then he needs to follow the "Entity_data_model_named. collection_name. ADD(object_name)" syntax. The above question also wants this type of statement.
  • The option c states the same statements, but there is needs one statement to define the name of db or database models. But the option c does not hold the name of the database models. Hence it is not the correct answer.
  • And the other options do not follow the syntax to add, hence others is also not a valid option.
3 0
3 years ago
Is there such thing as free will
dybincka [34]

Answer:

Yes there is but it's rare cause everywhere we go we're tied down from some rules cause they help society function better

7 0
3 years ago
Read 2 more answers
Why is weather forecast so important for hang gliders?
professor190 [17]
Well, it wouldn't be such a good idea if they got caught up in a storm, would it? :p

Strong winds could blow them off-course, or even lightning has a chance of striking the hand glider, causing damage to the glider, the person, or even both.

Additionally, a weather forecast can help in my generic situations. For example, knowing whether to wrap up warm for cold weather, or wear something a bit more loose and breathable for hot weather.
6 0
3 years ago
In a certain computer program, two positive integers are added together, resulting in an overflow error. Which of the following
Airida [17]

The option that best explains why the error occurs is that The program can only use a fixed number of bits to represent integers; the computed sum is greater than the maximum representable value.

<h3>Can programs represent integers?</h3>

An integer value is known to be often listed out in the source code of a program in a way called a sequence of digits that is said to be optionally prefixed with + or −. Note that some programming languages do use other notations, like hexadecimal.

Computers are known to use a a fixed number of bits to show an integer. The most -used bit-lengths for integers are known to be 8-bit, 16-bit, 32-bit or 64-bit.

Learn more about errors from

brainly.com/question/11472659

8 0
2 years ago
Other questions:
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    7·1 answer
  • Webster defines risk as "the possibility of loss or injury". Therefore, driving a motor vehicle is a risk.
    12·1 answer
  • A variation of pronounce is a. Proclaim c. Produce b. Profound d. Pronunciation Please select the best answer from the choices p
    11·1 answer
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • after placing her insertion point after grandma's kitchen, order the steps Danica needs to follow to insert and format the regis
    12·2 answers
  • Brainliest to whoever answers this first, i need help explaining.
    8·1 answer
  • HELP PLZZZZZZZZ!!!!!!!!!!!
    14·1 answer
  • Sometimes we care about the order of a list, and need to reorder the items according to a condition (alphabetical, numerical, et
    11·2 answers
  • Describe a cellular network, its principle<br> components and how it works.
    7·1 answer
  • Osing Commands
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!