Problem

In this exercise, you create a program that displays the sum of the even integer...

In this exercise, you create a program that displays the sum of the even integers between and including two numbers entered by the user. In other words, if the user enters an even number, that number should be included in the sum. For example, if the user enters the integers 2 and 7, the sum is 12 (2 + 4 + 6). If the user enters the integers 2 and 8, the sum is 20 (2 + 4 + 6 + 8). Display an error message if the first integer entered by the user is greater than the second integer.

a. Create an IPO chart for the problem, and then desk-check the algorithm three times. For the first desk-check, use the integers 1 and 5. For the second desk-check, use the integers 12 and 21. For the third desk-check, use the integers 50 and 3.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 7-14. Then code the algorithm into a program.

c. Desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Advanced32 Project and save it in the Cpp7\Chap07 folder. Enter your C++ instructions into a source file named Advanced32.cpp. Also enter appropriate comments and any additional instructions required by the compiler.

e. Save and then run the program. Test the program using the same data used to deskcheck the program.

Reference : figure 7-14

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search