Question: Please help...I do not know what I am supposed to do. This is for Computer Science class, using Pep/8 Slides 42 - 44 in the

Please help...I do not know what I am supposed to do. This is for Computer Science class, using Pep/8

Slides 42 - 44 in the PowerPoint presentation for this chapter, shows how to develop a pseudocode algorithm to read in paris of positive numbers and print each pair in order. Since there may be more than one pair of numbers, a count-controlled loop is used to read in all the pairs. Here is the pseudocode algorithm from the textbook:

Write "How many pairs?"
Read numberOfPairs
Set numberRead to 0
While (numberRead < numberOfPairs)
 Write "Enter two numbers: "
 Read number1
 Read number2
 If (number1 < number2)
 Print number 1, " ", number2
 Else
 Print number2, " ", number1
 Set numberRead to numberRead + 1

Modify this pseudocode algorithm so that it uses an event controlled loop which ends when the user enters a sentinel value for the first number (for example, your sentinel could be an unusual number like 999, but you can decide what the sentinel value should be). Write a test plan for this program. Write the program in assembly language and test it using your test plan.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!