Gain Immediate access to our Essays
FREE access exchanged for your work, or pay £9.99
Words: | Submitted: Mon Jun 19 2006
... enters '-99' (without the quotes) Output the total, the average, the smallest and the largest of the list. Note: The exact amount of numbers to be entered may vary. Test Case Input data Total Average Smallest Largest 1 6, 4, 20, 2, -99 32 8 2 20 2 1, 14, 3, 99, -99 117 29.25 1 99 3 50, 6, 13, -99 69 23 6 50 4 22, 22, 22, -99 66 22 22 22 5 14, 102, 4, 66, 29, -99 215 43 4 102 6 -99 0 0 0 0 Test the pseudocode using the data in the test table. 3. Write pseudocode that will add up some numbers entered by the user and print out the total. The numbers can be of any type. Start by asking the user how many numbers s/he has. Then read in the numbers one at a time. Each time you read a number, add it to a variable named, for example, total. Your design should allow a user to use it as many times as s/he wishes and to terminate if the user replies "n" when asked if ...
FREE access exchanged for your work, or pay £9.99