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
I am Lyosha [343]
3 years ago
6

What value(s) can be input into this code for the value of number that will cause the code in the loop to execute? Scanner keybo

ard = new Scanner(System.in); System.out.print("Enter a number: "); int number = keyboard.nextInt(); while (number < 100 && number > 500) { System.out.print("Enter another number: "); number = keyboard.nextInt(); }
Computers and Technology
1 answer:
Marianna [84]3 years ago
5 0

Answer:

There is no value of the number variable, for which the loop can be true in any iteration.

Explanation:

  • The above loop states the condition that the value should be less than 100 and greater than 500. It is because the loop holds the and condition which gives the true if both conditions will be true.
  • The first condition of the while loop states that the value of the number variable is less than the 100.
  • The second condition of the while loop state that the value of the number variable is greater than the 500.
  • The and condition of the while loop will true if both conditions will true.
  • But there is no number which is less than 100 and greater than 500.
  • So no number can satisfy the while condition to be true.

You might be interested in
Write a definition in your own words for Raster Graphic. Do not copy and paste please.
Vlada [557]

Answer:

Raster Graphic is a bitmap. They are basically a grid of small pixels that make an image.

6 0
3 years ago
Write a method named square that accepts an integer argument and returns the square of that argument.
BaLLatris [955]

Answer:

The method is as follows:

double square(int num){

return num*num;

}

Explanation:

Written in C++

This first line defines the method

double square(int num){

This line returns the square of num

return num*num;

}

<em>I've added the full program as an attachment where I include the main method</em>

Download cpp
7 0
3 years ago
Surprisingly, many of us may be unknowing victims of botnets. Because of the rising sophistication of botnet schemes, your compu
Virty [35]

Answer:

a. Simple rules

1. Upgrade your operating system

2. Upgrade your softwares regularly

3. Upgrade your browser when new additions are available

4. Change your password very often

b. Suspensious signs

1. The operating system and programs take a longer while to start up.

2. It shows lack of storage space despite having space

3. The PC crashes regularly

4. If the sent mails are received as spam

5. The hard disk is working excessively while no programs are currently running

C. All the part of a security incident should be logged.

Explanation:

a. Simple rules

1. Upgrade your operating system

2. Upgrade your softwares regularly

3. Upgrade your browser when new additions are available

4. Change your password very often

b. Suspensious signs

1. The operating system and programs take a longer while to start up.

2. It shows lack of storage space despite having space

3. The PC crashes regularly

4. If the sent mails are received as spam

5. The hard disk is working excessively while no programs are currently running

Explanation:

C. All the part of a security incident should be logged.

7 0
2 years ago
Given a Fully Associative cache with 4 lines using LRU replacement. The word size is one byte, there is one word per block, and
uranmaximum [27]

Answer:

3 bits

Explanation:

Capacity of main memory=16 Bytes=24

The number of address bits= 4 bits.

The size of the word= 1 Byte=20

The word bits=0.

Number of lines =4

Number of sets required=21

The sets bits is =1

The number of offset bits=20=0

Number of tag bits= total number of address bits - (word bits + offset bits + set bits)

= 4 - 0 -0- 1

= 3 bits

8 0
3 years ago
Differentiate between programming and coding
r-ruslan [8.4K]
Coding means creating codes from one language to another. Programming means to program a machine to perform using a set of instructions.
7 0
3 years ago
Other questions:
  • The overall purpose of a food guide is________.
    11·1 answer
  • What is a break in the content that forces takes on to the next line
    10·2 answers
  • What attack cracks a password or encryption key by trying all possible valid combinations from a defined set of possibilities (a
    12·1 answer
  • The ash and dust from a volcanic eruption can cause a _______ change in the environment.
    13·1 answer
  • Traceability of requirements is helpful in the followingexcept
    5·1 answer
  • What are two variables is figure 1 comparing
    10·1 answer
  • What is boolean rules​
    12·1 answer
  • Write a HTML program as shown in the output.​
    9·1 answer
  • Design an Application called Student Course Management create interface called Student Course add an abstract method called ad C
    10·1 answer
  • Phân tích cạnh tranh của cocacola và pepsi
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!