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]
2 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]2 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
Which of these is not an example of a transition
Mrrafil [7]

Answer: post the picture

Explanation:

1. Take the picture

2. Post it on brainly

3. Get your answer

4 0
2 years ago
Linda is the owner of Souvenirstop, a chain of souvenir shops. One of the shops is located at the City Centre Mall. Though the s
Klio2033 [76]

Answer:

attraction and attention

6 0
3 years ago
You often need to have several applications open at the same time. Which requirement is related to this need?
Musya8 [376]

Answer:

processor speed is the answer but not sure

5 0
2 years ago
When light does not pass through or bounce off an object, it is said to be
Dmitry [639]
The object is said to be absorbed
3 0
2 years ago
Read 2 more answers
What is communication barriers?​
SSSSS [86.1K]

Answer:

A communication barrier is anything that prevents us from receiving and understanding the messages others use to convey their information, ideas and thoughts.They can interfere with or block the message you are trying to send.

7 0
2 years ago
Read 2 more answers
Other questions:
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • For which punctuation symbol will you use the ring finger of your right hand?
    9·1 answer
  • Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the num
    13·1 answer
  • Management of software development consist of?
    15·1 answer
  • Character positions in<br> arrays start counting with<br> the number 1.<br> True<br> False
    14·1 answer
  • Write the definition of a function that evaluates three double numbers and returns true if the floor of the product of the first
    8·1 answer
  • Ok so I’m using a word document and towards the bottom of the page it stops me from moving my text box any further down even tho
    13·2 answers
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
  • Explain the role of computers in accounting
    11·1 answer
  • Where are all my smart ppl at? Help me out!!!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!