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
MySQL Questions?
Margarita [4]

Answer:

The Statement for selecting values from the table in SQL is given below,

SELECT vendor_name, vendor_contact_last_name, vendor_contact_first_name FROM Vendors;

Explanation:

SQL stands for Structured query language which is used to insert, update, delete and modify the value in a table.

There are five types of SQL-

1. Data definition language  

2. Data manipulation language

3. Data control language

4. Transaction Control Language

5. Data Query Language

The SELECT statement comes under DDL which is used to select and display values from a table.

We can use select statement in two ways-

1. SELECT column_name1, column_name2 ........column_nameN FROM Table_name;

2. SELECT * FROM tablename; ( This is used to select all values from the table name)

We can also give conditions using WHERE clause while selecting values.

6 0
3 years ago
Read 2 more answers
Which two of the following are analog signals? A) whether a place of business is open or closed B) the volume of the radio C) th
ella [17]

Answer: B) The volume of the radio and D) the outdoor temperature.

Explanation:

The analog signal is the signal that continuously varying with the time and it continuous analog signal. Analog signal is basically used to carry information or data from one device to another device.

The volume of the radio is the example of the analog signal as it carry voice from one place to another. The analog signal  is the type of signal that use to measure the particular change in the physical phenomena like pressure, sound and temperature in the environment. So, outdoor temperature is also the example of analog signal.

And the other options (A) and (C) are incorrect because it is represent any physical change in the environment.  

8 0
3 years ago
How to get answers on Microsoft form any code or hacks u can guv that'll be nice
KonstantinChe [14]

Simple, really. No hacks required. Just study and you'll do fine.

3 0
3 years ago
Use list indexing to print the last element of the list literal value.
AnnZ [28]

Answer:

print(["Not me", "Nor me", "Print me!"][2])

Explanation:

Given

print(["Not me", "Nor me", "Print me!"])

Required

Print last element of the list literal value

The implication of this question is to print "Print me!"

We start by analysing the given list.

The given list has 3 elements

But because indexing of a list starts from 0, the index of the last element will be 3 - 1 = 2

So, to print the last element, we simply direct the print statement to the last index.

This is done as follows

print(["Not me", "Nor me", "Print me!"][2])

The [2] shows that only the literal at the last index will be printed.

This means that the string "Print me!" will be printed.

The code can also be rewritten as follows

mylist = ["Not me", "Nor me", "Print me!"]

print(mylist[2])

Here, the first line stores the list in a variable.

The second line prints the last element of the list literal value which is "Print me!"

4 0
3 years ago
Who made bars no jutsu
poizon [28]

Answer:

he made it

Explanation: Louis [Cap]one

8 0
3 years ago
Other questions:
  • What is the function of a slide transition in a presentation program? A. It enables you to change the presentation layouts. B. I
    7·2 answers
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • These devices: monitor, earphone, speakers are examples of what? Input devices Storage devices Output devices All answer are cor
    10·2 answers
  • ________ are devices in a computer that are in either the on or off state
    14·1 answer
  • How can you put a logo on html without breaching the copyright, design and patents act
    12·1 answer
  • What would be the most popular piece of technology on Earth?
    11·2 answers
  • Which devices typically generate computer output ?
    8·2 answers
  • Sam has created a fashion website. There are many subscribers to his website. He has added new blogs, pictures, and articles abo
    13·1 answer
  • If you are a mathematics student and want to study the secret of writing cryptographic codes, algorithms, encryption and decrypt
    14·1 answer
  • Today's manufacturing workplace is most likely to include
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!