Ch. 06_HW.docx - Chapter 6 Homework Create a flowchart or...

This preview shows page 1 - 2 out of 2 pages.

Chapter 6 Homework Create a flowchart or pseudocode. Turn in a Text File, Word Document or PDF of the exercise. This is an individual assignment. 1a. Design the logic for a program that allows a user to enter 20 numbers, then displays them in the reverse order of entry. Start Declarations num SIZE = 20 num numberEntry[SIZE] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 num index housekeeping() while index < SIZE processNumbers() endwhile finishUp() Stop housekeeping() output “Enter any numbers 20 times.” index = 0 return processNumbers() output “Enter a number.” input numberEntry[index] index += 1 return finishUp() output “The numbers entered are: “ while index > 0 index -= 1 output numberEntry[index] endwhile return 1b. Modify the reverse-display program so that the user can enter any amount of numbers up to 20

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture