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
A document repository is down when you attempt to access it. which isa principle is being violated?
Tju [1.3M]
When a document repository is down when you attempt to access it, the ISA principle Authentication is being violated. The authentication method is done during the log on phase and is performed by the ISA server which requests certificate. <span>The client then needs to send the appropriate client certificate to the server in order to be authenticated and to have access to the document.</span>
3 0
3 years ago
What are the different types of topology?​ in details
wlad13 [49]

Answer:

<h2> <u>NETWORK</u> <u>TOPOLOGY</u> .</h2>

This tefers to how nodes are connected to the network.

Types of topology.

  • Physical topology.
  • Logical topology.

In physical topology,nodes are connected physically using wires(cables).

Types of physical topology include:

  • Bus topology
  • Tree topology
  • Hybrid topology
  • Star topology
  • Ring topology.

Hope it helps you,any question so far...comment !!!

3 0
2 years ago
Read 2 more answers
All changes
Vsevolod [243]

You should get up and move every 30 minutes

Hope  this helps

-scav

7 0
3 years ago
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
bogdanovich [222]

Answer:

True

Explanation:

3 0
3 years ago
The Free Basis program partners with social network websites to improve Internet access. They believe that Internet access
sattari [20]

Answer:

IS good

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Company A is setting up a network of mostly Windows machines. Which networking file system protocol would you recommend for maxi
    5·1 answer
  • You are an administrator for contoso.com. you have two servers called server1 and server2 that run windows server 2012 and have
    9·1 answer
  • Give one advantage and two disadvantages of using a wireless network
    8·1 answer
  • What is performance? Multiple Choice measures how quickly a system performs a process or transaction a system that is not operat
    9·2 answers
  • _____ is a form of witty, amusing speech that is often used to bring people together.
    7·2 answers
  • Which of the following statements about the break statement is false? Group of answer choices Common uses of the break statement
    12·1 answer
  • What happens to a data table when the formulas or variables used to create it are changed?
    9·2 answers
  • New trends, tools, and languages emerge in the field of web technology every day. Discuss the advantages of these trends, tools,
    15·1 answer
  • What is your favorite song? mine is "In the final"
    7·2 answers
  • What is printed when the following code has been executed?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!