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
Jonas is an experienced security professional who recently accepted a position in an organization that uses Check Point firewall
vichka [17]

Answer:

CCSA

Explanation:

CCSA is "Checkpoint Certified Security Administrator". This certification is best suited for Jonas.

8 0
3 years ago
During working hours an electrician should not wear
Arlecino [84]
B. a wristwatch or rng because you and get electrocuted 
3 0
3 years ago
Plz help me for this !!!!!!!!!!!
harina [27]

Answer:

what do u need help with??

8 0
3 years ago
Software that interprets commands from the keyboard and mouse is also known as the what?
7nadin3 [17]
Out of the ones that you mention, the correct answer should be 
<span> Operating system</span>
3 0
3 years ago
Read 2 more answers
Write a C program that stores the number 123.45 in the variable alpha, 98.76 in the variable beta, and 76.67 in the variable gam
Anon25 [30]

Answer:

C

Explanation:

the answer

8 0
2 years ago
Other questions:
  • Free points! your welcome
    9·2 answers
  • Select the best answer for the question. 2. What is the simplest way to permanently get rid of an unwanted file?
    13·1 answer
  • Controlling access of information on the internet
    15·1 answer
  • No production Web application, whether it resides inside or outside of the firewall, should be implemented without:
    6·1 answer
  • Help it's the last question quickkk​
    7·1 answer
  • Desktop and personal computer are also known as​
    7·1 answer
  • Un comerciante de régimen código para comprar mercancías gravadas a un comerciante de régimen simplificado precio de venta al pú
    5·1 answer
  • Which terms represent the two types of client requirements?
    7·2 answers
  • 100 POINTS!!!!!!!
    15·2 answers
  • Which option will be used to attach email messages ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!