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
Several years ago, Jaime began to operate a small home business. He was very excited by the new features of Windows 95. These ne
Dmitriy789 [7]

1. A complete operating system rather than a graphical user interface running on top of MS-DOS.

After boot up, the system completely run without MS-DOS environment.

2. Improved windows control and appearance of windows

Windows 95 has a new system control that located on the upper left corner of each window as an icon. In the upper right of each window, it has a new designed system box. Usually, it displays "Minimize", "Maximize/Restore" and new added "Close" buttons.

3. New introduced Desktop

Not only to store minimized icons, Windows desktop in Windows 95 can store files, shortcuts and system icons such as "My Computer" and "Recycle Bin".

4. Right button menu

Right click an object in system usually can bring a pop-up menu with some items like "edit", "copy", "paste", "properties" and "help".

5. New help system

The help window can resize and jump to anywhere in the screen. It splits to two areas in which left side is the index or keyword window and the right side is the content window.

6. Task bar and start menu

Similar to the concept of reserved area in Windows 1.x, Windows 95 began to have a task bar to store the links that can active or inactive an running program and display some system information in the tray area. A start menu was include in the task bar can let user access the shortcuts to all programs in a tree structure menu system.

7. Build-in network support with dial-up for different protocols

The build-in dial-up with support of TCP/IP protocol made user easier to access Internet. In OSR2 version of Windows 95, Microsoft began to integrate Microsoft Internet Explorer in Windows 95.

8. Folder view of all kinds of files and resources

In Windows 95, files, drives, shortcuts and network resources can all be displayed in a folder view in the new Windows Explorer which replaced Program Manager in pervious version of Windows.

9. Support of 32 bit application, pre-emptive multitasking and thread

These functions made Windows 95 to have the ability to run more complex tasks and programs.

3 0
3 years ago
Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
larisa [96]
I think this answer is b
5 0
3 years ago
Read 2 more answers
Which of the following should NOT be done to keep people from slipping on floors? A) Have the proper absorbents in an easy-to-fi
RoseWind [281]

The following options helps keep people from slipping on floors

A) Have the proper absorbents in an easy-to-find place to quickly put on spills : So that accidental little spills can be cleaned right away.

C) Wear slip-resistant footwear : It is a precautionary step to follow, no matter where we go.

D) Mark a slippery area with an easy-to-use tent sign that says " Caution, Slippery floor" : This allows people to be aware of the wet area and cross it cautiously.

Leaving oil and fluids to air dry thoroughly, takes a long time and there are chances that people step over it and slip.

So, the answer is

(B) Anytime oil or fluids are spilled on the floor, leave them to thoroughly air dry.

8 0
4 years ago
Read 2 more answers
Complete the steps for adding a recurring event.
daser333 [38]

Answer:

which type of questions is this

7 0
3 years ago
It is necessary for us to verify and checked information before we shared online? Explain​
lesya [120]

Answer:

The answer is yes.

Explanation:

If you don’t check where the source is from and if it is verified, you may share an incorrect and false answer. Also, you may type in your personal information. This is <u>VERY</u> risky. Do <u>NOT</u> share your private information to strangers!

You can check your information by searching it up online or asking a teacher! There! I hope this helps! ;)

4 0
2 years ago
Other questions:
  • List several things that geographers can map using remotely sensed data
    5·1 answer
  • The smallest signed integer number, base 16, that can be store in a variable of type BYTE is__________.
    8·1 answer
  • Which is true about POP3 and IMAP for incoming email?
    10·1 answer
  • What is the difference between paper size and page margins in Word?
    10·1 answer
  • you are teaching a class about basic camera functions like power, basic date/time, menu navigation, and how to properly attach a
    9·1 answer
  • Are the blank space around the edges of the page
    5·1 answer
  • Colby works as a shipping clerk for a major package delivery service. Some of his daily tasks include tracking shipments and ent
    7·2 answers
  • Why can a bank afford to pay an interest rate on a savings account?
    11·1 answer
  • Backing up your data on a regular basis is a part of the
    14·2 answers
  • What is edge computing?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!