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
Anuta_ua [19.1K]
3 years ago
14

Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha

s an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message.
Computers and Technology
1 answer:
madam [21]3 years ago
3 0

Answer:

           while (Num>=0) {

               System.out.println("enter a another number");

               Num = in.nextInt();

           }

Explanation:

The complete java code prompting a user to enter a number until a negative number is entered is given below:

import java.util.Scanner;

public class num6 {

public static void main (String [] args) {

Scanner in = new Scanner(System.in);

System.out.println("enter a number");

int Num = in.nextInt();

while (Num>=0) {

System.out.println("enter a another number");

Num = in.nextInt();

}

System.out.println("Done.");

return;

}

}

You might be interested in
What would I need to make the perfect music video
Lera25 [3.4K]
To make the perfect music video, you would need a bunch of b-roll and clips that relate to the song. If it’s a slow, relaxing song, you want things that are slow and represent peace. If it’s about something specific, you should have a story behind it to explain. Hope this helps! :)
4 0
3 years ago
Do network packets take the shortest route?
Sergio039 [100]

Answer:

The packet will take a shorter path through networks 2 and 4

5 0
2 years ago
Read 2 more answers
The process of making raw materials into a finished product is known as
Olin [163]
1.) Business Engineering or Manufacturing :)
<span />
6 0
3 years ago
Read 2 more answers
Quick SearchLinks to an external site. lets you refine or narrow your search results using links on the right side of the screen
nikdorinn [45]

Answer:

Answer is

By topic, By collection.

Refer below.

Explanation:

Quick SearchLinks to an external site. lets you refine or narrow your search results using links on the right side of the screen. Do a search on wind power. Some criteria that can refine your search results in Quick Search are:

By topic

By collection

5 0
3 years ago
Chunking is a good strategy for completing large assignments because it makes the work
Bess [88]

Answer:

ExChunking is a good strategy for completing large assignments because it makes the work

less boring.

more thorough.

less difficult.

more manageable.planation:

Explanation: less difficult (C)

8 0
3 years ago
Read 2 more answers
Other questions:
  • Select one of the following strategies: active listening, sandwich technique, constructive feedback. in 2-5 paragraphs, define a
    11·1 answer
  • A user is implementing security on a small office network. Which two actions would provide the minimum security requirements for
    10·1 answer
  • What are two advantages of encrypting data stored in the computer system?
    5·1 answer
  • You have just installed a new NIC in your PC to replace the old one that had started malfunctioning. What additional software mu
    15·1 answer
  • Why do attackers tend to target public or private Wi-fi networks?
    10·1 answer
  • Which game would you play info you were competitive?
    13·2 answers
  • Who is the best Attack on Titan Character?
    12·2 answers
  • What are the local, state, and national opportunities that may be available to those who participate in CTSOs?
    9·1 answer
  • What is cloud computing?
    13·2 answers
  • _______________________ variables do not need to be declared inside the function definition body, they get declared when the fun
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!