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
kondor19780726 [428]
2 years ago
12

imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr

ades, and you want to ensure that you obtain 5 valid values from the user. which nested loop structure would you use?
Computers and Technology
1 answer:
Aloiza [94]2 years ago
7 0

In a computer program, loops are used to perform repetitive operations until a condition is met.

The nested loop structure to use in this case is: <em>A "while" loop inside of a "for" loop</em>

<u>The outer loop</u>

First, you must iterate through each student.

This can be done using a for loop or a while loop.

However, it is faster to implement this kind of iteration on a for loop, than a while loop

So, the algorithm of the outer loop would look like the following:

<em>for student = 1 to 5 step 1</em>

<em />

<u />

<u>The inner loop</u>

Next, you must get input for the 5 grades for each student

After getting input for the grade of each student, a loop would be used to test if the input is valid.

The loop would be repeated until the user enters a valid input.

This can only be done using a while loop.

So, the algorithm of the inner loop would look like the following:

<em>input grade</em>

<em>while grade is invalid:</em>

<em>     input grade</em>

<em />

<em />

<em />

Hence, the nested loop structure to use is:

<em>A "while" loop inside of a "for" loop</em>

<em />

<em />

Read more about loops at:

brainly.com/question/11608024

You might be interested in
The ________ tier of the three-tier architecture consists of computers, phones, and other mobile devices that have browsers that
andrey2020 [161]

Answer:

It is the user tier of the 3-tier architecture that consists of computers, phones, and other mobile devices that have browsers that request and process web pages.

Explanation:

Almost if not all applications that use e-commerce for operations use the 3-tier architecture.  3-tier architecture is simply the arrangement of server tier which consists of all computers that run a web server and a database tier that consists of computers that run a DBMS to store and retrieve data. We also have the user data that consists of computers, phones, and other mobile devices that have browsers that request and process web pages.

When you make a request, for instance to Google in your local browser, the browser sends a request to the internet. This initial interaction between the user and the internet is what is known as the user tier of the 3 tier architecture. Basically, it is the phase where end users access content online through graphical interface browsers and make requests to the web servers and DBMS.

Learn more about 3-tier architecture

brainly.com/question/12627823

#LearnWithBrainly

6 0
3 years ago
Divide the difference of 47 and 23 by the difference of 25 &amp;13​
OleMash [197]

Answer:

The answer is 2

Explanation:

3 0
2 years ago
what feature allows you to create a form letter or certificate and personalized it for different recipients by usin the info in
agasfer [191]

Answer:

mail merge is the answer to this one i believe

6 0
3 years ago
if you see that your bank account has had some money taken out that you did not authorize, which of the following is one action
Savatey [412]
I would go straight to the bank and have it reported along with the police.
7 0
3 years ago
The variables xp and yp have both been declared as pointers to integers, and have been assigned values. Write the code to exchan
shepuryov [24]
The question is asking us to swap the values of xp and yp while not changing where they point to. Setting xp equal to yp would not work because then we couldn't change yp since the value for xp was overwritten. We can use a third variable to swap them.

int zp = xp;
xp = yp;
yp= zp;
6 0
3 years ago
Other questions:
  • Instead of typing out each co-worker's email address individually, you can use the Office Online People application to create a
    8·2 answers
  • 12. Which one of the following items would you be most likely to keep in a database?
    10·1 answer
  • I need to write a really simple python program to solve this issue. I have most of the program written but, when I run the secon
    8·1 answer
  • For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v
    13·1 answer
  • Write the sum of products, the canonical product of sums, theminterm shorthand and the maxterm shorthand for the following:
    6·1 answer
  • ______involves encoding information using fewer bits than the original representation Group of answer choices
    6·1 answer
  • Pls help me im confused prob more on the way
    6·1 answer
  • Why do we need to make a plan before actions?
    7·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • How to create drop down list in excel with multiple selections.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!