Formulate a pseudocode algorithm for each of the following: a) Obtain two numbers from the keyboard; compute the sum of the numbers and display the result. ANS: Input the first number Input the second number Add the two numbers Output the sum b) Obtain two numbers from the keyboard, and determine and display which (if either) is the larger of the two numbers. ANS: Input the first number from the keyboard Input the second number from the keyboard If the first number is greater than the second number Print it Else if the second number is greater than the first number Print it Else Print a message stating that the numbers are equal c) Obtain a series of positive numbers from the keyboard, and determine and display the sum of the numbers. Assume that the user types the sentinel value -1 to indicate “end of data entry.” ANS: Input a value from the keyboard While the input value is not equal to -1 Add the number to the running total Input the next number Print the sum
© Copyright 2026 Paperzz