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
Anton [14]
3 years ago
10

write a loop that reads positive integers from stands input and that terinated when it reads an interger that is not positive af

ter the loop termpinates
Computers and Technology
1 answer:
gtnhenbr [62]3 years ago
5 0

Loop takes only positive numbers and terminates once it encounters a negative numbers.

Answer and Explanation:

Using javascript:

Var positiveInt= window.prompt("insert positive integer");

While(positiveInt>=0){

Alert("a positive integer");

Var positiveInt= window.prompt("insert positive integer");

}

Or we use the do...while loop

Var positiveInt= window.prompt("insert positive integer");

do{

Var positiveInt= window.prompt("insert positive integer");

}

While (positiveInt>=0);

The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input

You might be interested in
Ssume the following variables contain the values shown: numberRed = 100 numberBlue = 200 numberGreen = 300 wordRed = "Wagon" wor
brilliants [131]

Answer:

  1. numberRed = numberBlue   = FALSE
  2. numberBlue > numberGreen  = FALSE
  3. numberGreen < numberRed   = FALSE
  4. numberBlue = wordBlue   = ILLEGAL
  5. numberGreen = "Green"   = FALSE
  6. wordRed = "Red"     = FALSE  
  7. wordBlue = "Blue"     = FALSE
  8. numberRed <= numberGreen  = TRUE
  9. numberBlue >= 200    = TRUE
  10. numberGreen >= numberRed + numberBlue = TRUE
  11. numberRed > numberBlue AND numberBlue < numberGreen = FALSE
  12. numberRed = 100 OR numberRed > numberBlue   = TRUE
  13. numberGreen < 10 OR numberBlue > 10     = FALSE
  14. numberBlue = 30 AND numberGreen = 300 OR numberRed = 200 = FALSE

Explanation:

THESE RESULTS ARE VERIFIRED.....

6 0
3 years ago
Explain the history of America ​
Tomtit [17]

Explanation:

The history of the United States is what happened in the past in the United States, a country in North America. ... They won the Revolutionary War and started a new country. They signed the constitution in 1787 and the Bill of Rights in 1791.

Military conflict

8 0
3 years ago
Read 2 more answers
One friend claims that a dual-core system runs at twice the speed as a single-core system; another friend disagrees by saying th
lidiya [134]

Answer:

<u>the first friend</u>

Explanation:

It is important to <em>remember </em>that a core is the brain of the CPU (central processing unit), which means one who has a dual-core is having <em>"a dual brain" </em><em>to process information faster.</em>

Consider also, IT experts often acknowledge that in terms of speed of execution, it is proven that, "dual-core systems" are <em>faster</em> (even twice faster) than a "single-core system". The other friends were wrong because they disagreed with a widely accepted fact that dual-core is faster than single-core; and of course, <em>we know that without them being faster they can't run twice the applications and twice the data. </em>

Therefore, we can make the conclusion that the first friend's response is correct.

5 0
3 years ago
If a firm is set to use open-source software with which no one in the IT department is familiar, what should it do? fire the IT
Aleonysh [2.5K]
The most efficient thing to do would be to provide training as firing or doing nothing halts productivity indefinitely while training eventually will finish
7 0
3 years ago
Read 2 more answers
If you often purchase items at the same e-tailer and do not have to type in your username and/or password, this probably means
tatyana61 [14]

Answer:

Explanation:

This probably means that your browser has saved your username and password into the browser's password manager. This usually occurs the first time you enter your username and password into a new website. The browser will detect this and request to save this information into the password manager. If you agree to do so it will save it and automatically enter this information when opening the site in the future.

3 0
3 years ago
Other questions:
  • The mutt software is an example of what type of mail service software on Linux? a. Mail Delivery Agent b. Mail Transport Agent c
    5·1 answer
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • Which of the following statements is false? People tend to shortcut security procedures because the procedures are inconvenient.
    13·1 answer
  • Once artwork is inserted into a placeholder, it can be moved around on a slide. True False
    9·1 answer
  • Who all likes fortnite
    15·2 answers
  • Reading log of any book with page numbers​
    5·1 answer
  • /*Implement a class Address . An address has a house number, a street, an optional
    5·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • Visit on social networking site and look for the site's privacy policy.The link is typically found at the bottom of the page and
    9·1 answer
  • __________ implements a security policy that specifies who or what may have access to each specific system resource and the type
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!