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
Which was the first wiki based website
stira [4]
WikiWikiWeb was the first made by <span>Cunningham.</span>
5 0
3 years ago
Read 2 more answers
It is considered good practice to save a presentation before printing it. true false
Ilya [14]
It is true because it is really a good practise to save a presentation before printing it

5 0
2 years ago
A set of blocks contains blocks of heights 1,2, and 4 centimeters. Imagine constructing towers of piling blocks of different hei
SashulF [63]

Answer:

In studies about new medicines, researchers usually give one group of patients the medicine that is designed to treat an illness. They give another group of patients a placebo, which is taken the same way as the medicine but does not actually contain the ingredients of any medicine. Different medicines are tested in different experiments, but the placebos usually contain the same non-medical ingredients. If both groups of patients are healed, then researchers cannot be sure whether the medicine caused improvement, but if the group given the medicine is healed while the group given the placebo remains ill, researchers can conclude that the medicine causes the illness to go away.

In medical experiments, which group receives placebos?

the experimental group

the control group

both the experimental and control groups

neither the experimental nor control group

Explanation:

5 0
3 years ago
William brought some data into his Tableau Book, but the data had some null values and incorrect column headers. What did Willia
ozzi

William  had to manually edit the data if he wants to remove the null values and incorrect column headers.

<h3>What is data editing?</h3>

Data editing is known to be a term that connote the act of making changes, reviewing or adjustment  some survey data.

Note that by editing one can remove want one do not want from a group of data and as such,  William  had to manually edit the data if he wants to remove the null values and incorrect column headers.

Learn more about data from

brainly.com/question/26711803

#SPJ1

6 0
2 years ago
Look at the following partial class definition, and then respond to the questions that follow it:
zhannawk [14.2K]

Solution :

a.

public Book($\text{String title}$, String author, $\text{String publisher}$, int $\text{copiesSold}$) {

 this.$\text{title}$ = $\text{title}$;

 this.$\text{author}$ = $\text{author}$;

 this.$\text{publisher}$ = $\text{publisher}$;

 this.$\text{copiesSold}$ = $\text{copiesSold}$;

b). $\text{public String}$ getTitle() {

 return $\text{title}$;

}

$\text{public void}$ setTitle($\text{String title}$) {

 this.$\text{title}$ = $\text{title}$;

}

$\text{public String}$ getAuthor() {

 return author;

}

$\text{public void}$ setAuthor(String author) {

 this.$\text{author}$ = $\text{author}$;

}

$\text{public String}$ getPublisher() {

 return $\text{publisher}$;

}

$\text{public void}$ setPublisher(String $\text{publisher}$) {

 this.$\text{publisher}$ =$\text{publisher}$;

}

public int get$\text{copiesSold}$() {

 return $\text{copiesSold}$;

}

$\text{public void}$ set$\text{copiesSold}$(int $\text{copiesSold}$) {

 this.$\text{copiesSold}$ = $\text{copiesSold}$;

}

4 0
2 years ago
Other questions:
  • We have a user Sally Smith who we want to grant the ability to launch applications and browse folders. But we do not want her to
    15·1 answer
  • When you use the bufferedreader class, you must import the ____ package into your program?
    14·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • Which part of the cpu stores instructions for high speed access or processing
    14·1 answer
  • The quality of a language that allows a programmer to express a computation clearly, correctly, concisely, and quickly is called
    7·1 answer
  • What are dividends? AA small part, or share, of a company. BA type of savings account that grows over time. CA distribution of a
    5·1 answer
  • Write a sentence about a mineral you use and how you use it
    12·1 answer
  • Which of the following statements holds true for the term "html"? It refers to a system that connects end users to the Internet.
    10·2 answers
  • There are....... section in<br>cpu<br>​
    15·1 answer
  • 1.Microsoft Word is a/an ........​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!