COMP 122 COMP122 Week 3 Homework Assignment Solution

COMP 122 COMP122 Week 3 Homework Assignment Solution

soffix

  • $12.99


COMP 122 Week 3 Homework

Complete the following problems.

 

1. What is the output from the following C++ code fragment?

2. What is the output from the following C++ code fragment?

3. What is the output from the following C++ code fragment if the following values are the inputs to cin?

4. What is the output from the following C++ code fragment if the following values are the inputs to cin?

5. Write a do – while loop to get 20 numbers from the user and sum them together. Output the sum after the loop. Declare any variables you need

6. What is the output from the following C++ code fragment if the following values are the inputs to cin?

7. What is the output from the following C++ code fragment?

8. What is the output from the following C++ code fragment?

9. Given the following C++ code fragment, answer the questions that follow

10. Write a for statement to add all the multiples of three between 1 and 100. (ie. 3, 6, 9, … 99).

11. How many times will the loop bodies execute in the following loops?


We Also Recommend


Sale

Unavailable

Sold Out