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
What name is used to denote a common field that exists between two tables, but is also the primary key for one of the tables??"
Diano4ka-milaya [45]

Answer:

b. foreign key

Explanation:

In the database world, a foreign key is a field on one table and a primary key for another table. The purpose of a foreign key is to provide linkages between two or more tables. Given two tables A and B, and making A the point of reference, a primary key is a field that is unique in A while a foreign key is unique in B.

On another hand, a composite primary key is a combination of two or more fields/columns on database table that can be used to uniquely identify each row in the table.

In the database lingua, what we have is a unique key not a distinct key, though the two words are similar in meaning.

A duplicate key is used when an information may be repeatedly entered on a table.

So the correct option is a foreign key.

4 0
3 years ago
The S in SQRW stands for....
user100 [1]
B.................................
8 0
3 years ago
Read 2 more answers
The replacement policy that can be implemented in practice and performs the best among the replacement policies that can be actu
scoundrel [369]

Answer:

The answer is "Least recently used policy".

Explanation:

It is the page replacement policy, which uses a less frequent substitute.  It adds a registry from each frame that includes the last time the program, that views within the frame, and use a "logical clock" for each of the data references, that made to change by a tick.

This replacement strategy is often used to substitute its least currently utilized cache line or page, and it is realistic and best implemented among the substitution policies.

6 0
2 years ago
Which are options for levels of junk e-mail protection in outlook 2010? Check all that apply.
Alexus [3.1K]
Im pretty sure it  
<span>No automatic filtering
Partial automatic filtering
</span><span>Safe lists only
</span><span>High

</span>
6 0
3 years ago
Read 2 more answers
Advantages of a compiler​
valentina_108 [34]

Answer:

Improved performance.

Reduced system load.

Protection for source code and programs.

Improved productivity and quality.

Portability of compiled programs.

SAA compliance checking.

3 0
2 years ago
Read 2 more answers
Other questions:
  • Think about a time when someone made a biased judgment about you or acted unfairly toward you because of your age, skin color, c
    6·1 answer
  • Write a MATLAB script using the quiver and contour commands to visualize the field and its divergence. Assume the region of inte
    12·1 answer
  • Where are some places that cyberbullying occurs? check all that apply
    6·2 answers
  • Traditional methods of business communication tend to mean paper-based messages such as formal letters, brochures, reports, prop
    10·1 answer
  • Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect
    13·1 answer
  • Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum tha
    7·1 answer
  • You designed a program to create a username using the first three letters from the first name and the first four letters of the
    6·1 answer
  • A major public university graduates approximately 10,000 students per year, and its development office has decided to build a We
    10·1 answer
  • Which of the following is a database concept that allows for storage and analysis for a dozen to billions of data points?
    7·1 answer
  • Which of the following offers more reliable antivirus protection? Question 43 options: A) antivirus software on user PCs B) anti
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!