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
____________are the video images provided for editor to cut to and from instead of making viewers watch talking heads
Luda [366]

Answer:

The Scripts

Explanation:

7 0
3 years ago
John works for Internal Computer Specialists, which focuses on helping small business owners resolve MIS infrastructure issues.
natali 33 [55]

Answer:

A) Hardware

Explanation:

The hardware component of the computer refers to the physical parts of the computers that can be see and touched this contrasts the sofware component of the computer that are programs (sets of instruction). All the coponents listed in the question are physical parts of the computer and belong to the hardware component.

5 0
3 years ago
What is the maximum length of a text field can be?<br>​
Luda [366]

Answer:

4000 characters

Explanation:

I think the max is 4000 characters

7 0
2 years ago
Read 2 more answers
Select all the correct answers.
IgorC [24]

Answer:

I. Improper cable installation.

II. Interference between the signals on cables close to each other.

III. Improper connection of a network cable to the jack

Explanation:

The standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. Thus, the standard Internet communications protocols which allow digital computers to transfer (prepare and forward) data over long distances is the TCP/IP suite.

In this scenario, Mark is unable to connect to the internet or to any of the computers on his network, while nearby computers don’t have this problem. Therefore, the three issues which could be causing the problem are;

I. Improper cable installation: this involves not installing the ethernet cable in the correct destination port.

II. Interference between the signals on cables close to each other: interference usually results in the disruption in network signals.

III. Improper connection of a network cable to the jack: the right connectors such as RJ45 should be used.

6 0
3 years ago
Which memory will be suitable (a) to Run a software (b) to store a software permanently ?
Katena32 [7]

(a) To run a software => RAM

(b) To store a software => ROM

3 0
3 years ago
Other questions:
  • What bug was supposed to start affecting computers on january 1 2000
    9·1 answer
  • Why are computer programs so much longer now than they were in the late 1980?
    8·1 answer
  • Which option will enable Mina to apply several formats to the spreadsheet cells at the same time? A. cell content B. cell patter
    13·1 answer
  • Sarah's employer purchased a health insurance plan that costs $750 per month. Sarah pays $75 toward the plan each month. What is
    5·2 answers
  • An___ is a rectangular work area in the desk top that contains a program, text, files, it other data and tools.
    5·1 answer
  • Explain how inflation flattens the universe
    6·2 answers
  • we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines. Which of these queu
    12·1 answer
  • Computers that have multiple CPUs within a single computer, sharing some or all of the system's memory and I/O facilities, are c
    15·1 answer
  • Jak sie pisze oł na klawiaturze komputerowej
    11·1 answer
  • This project must target a Unix platform and execute properly on our CS1 server.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!