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]
4 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]4 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
Every file on a storage device has a _______. (a.) name (b.) size (c.)both of the above (d.) none of the above
zmey [24]
The correct answer is: C: both of the above, i. e. name and size.
8 0
3 years ago
Two-dimensional array indexes are listed as
Luda [366]

Answer:

rows and columns, or matrix

Explanation:

Two-dimensional 2D arrays are being indexed with the help of two subscripts. The first one is for the row and the second one if for the column. And each of the elements of the 2D array must be of the one kind like they all can be an object type or they all can be of primitive type.

Like:

int A[3][3];

The above is the 2-dimensional array in C++, and elements are of type int, which is a primitive data type.

5 0
4 years ago
Students at a residence hall are reporting internet connectivity issues. The university’s network administrator configured the r
alisha [4.7K]

Answer: D) DHCP snooping

Explanation:

 DHCP stand for the dynamic host configuration protocol and it is basically use as the DHCP server. It provide the IP address to each device in the network and it is used to communicate with the other IP network.

According to the question, the student device basically receive the IP network and it is an unauthorized DHCP server which uses denial of service attack for several purposes.

DHCP snooping is basically use to prevent from such unauthorized device which gives the IP address to the clients. DHCP is the two layer security system technology that is bulit in the operating system.

7 0
3 years ago
Tax preparation software can help prepare and file your taxes by _________.
ludmilkaskok [199]

Answer:

B. Posing questions to collect necessary information

Explanation:

Tax preparation software serves as software that makes filing as well as preparation of tax to be easier.

3 0
2 years ago
How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
Sati [7]

Answer:

d. European nations competed and made alliances to control colonies.

Explanation:

The world War I was a period of battle between various countries from 1914 to 1918. It started formally on the 28th of July, 1914 and ended on the 11th of November, 1918.

Imperialism can be defined as a policy, ideology, or advocacy that sought to extend a country's power, dominion, authority and influence over another country through diplomacy, use of military force or colonization (direct territorial acquisition).

This ultimately implies that, imperialism is an advocacy or policy that is typically used to impose or extend a country's power, dominion, authority and influence. It simply means to seek colonies of other nations or countries.

Hence, imperialism led to WW1 because European nations competed and made alliances to control colonies.

In conclusion, there was an eagerness on the part of European Nations to gain colonial territories that were owned by other rival nations.

8 0
3 years ago
Other questions:
  • You are given a network of 10.50.24.0/21, which contains 2,048 addresses. what subnet mask should you use to divide this into fo
    7·1 answer
  • A newspaper publishes a negative editorial on how local politicians are dragging their feet in building a new bridge. Select the
    5·2 answers
  • If you touch a downed power line covered or bare, what’s the likely outcome?
    10·2 answers
  • What the benefit is of folders when working with files
    13·2 answers
  • Documentation for evidence which includes exactly what, when, and from whom evidence was collected, the condition of this eviden
    6·1 answer
  • 12) If the image's name is filename.gif, how can I make this image the background of my page?
    6·1 answer
  • Why would an information systems security practitioner want to see network traffic on both internal and external network traffic
    5·1 answer
  • I need help with this answer, I will give brainliest as long as there is actually an answer!
    11·1 answer
  • Pls help me!! I will give 35 points and mark brainliest !!!
    10·1 answer
  • What is the last phase of the website development process?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!