Question: The following pseudocode algorithm reads two integer values startint and n, then it displays the sum of starint and the next n consecutive integers. For

 The following pseudocode algorithm reads two integer values startint and n,

The following pseudocode algorithm reads two integer values startint and n, then it displays the sum of starint and the next n consecutive integers. For example: . . It startint is 7 and n is 4 the program displays 45 as 7+ 8+ 9+ 10 + 11 = 45 (the sum of 7 and the 4 integers after it). if startint is 9 and n is 7 the program displays 100 as 9 + 10 + 11 + 12 +13 + 14 + 15 + 16 = 100 (the sum of 9 and the 7 integers after it). Input: Two integers Output: the sum of the integer and the n numbers after it. Pre-condition: A positive integer as input Pseudocode: READ startInt READ n SET num To startInt SET sum TO O SET end To startInt + n WHILE num

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!