You are on page 1of 9

1.

Write a program that asks the user to enter three integers, then computes their decimal

average and prints the result

  • 2. Write a function that takes in three integer parameters and returns their decimal

average. (How does this differ from the previous problem?)

1. Write a program that asks the user to enter three integers, then computes their decimal

3. Write a function that takes in two integer parameters and returns true if the first parameter is a multiple of the second, and false otherwise. (Hint: The % operator can help you determine factors and multiples).

3. Write a function that takes in two integer parameters and returns true if the first

4. Write a function that takes in three integer parameters and decides if they could be the lengths of the sides of a right triangle. If so, return true. Otherwise, return false. (Hint:

Pythagoras had a little theorem, it's hypothesis was white as snow...)

4. Write a function that takes in three integer parameters and decides if they could be

5. Write a program that has the user enter the radius of a circle, then compute and print the diameter, the circumference, and the area. Use the value 3.14159 for pi.

5. Write a program that has the user enter the radius of a circle, then compute

6. Write a function that takes in two integer parameters, x and y, and computes and returns x raised to the y power. Do this without using any <cmath> library functions

6. Write a function that takes in two integer parameters, x and y, and computes and

7. Write a function that takes in a positive integer parameter N, and then returns the sum of all the positive numbers that are less than or equal to N. (i.e. add up all numbers from 1 through N ­­ you'll need a loop).

7. Write a function that takes in a positive integer parameter N, and then returns the

8. Write a function that does the same as the previous exercise, but adds up only the odd numbers from 1 to N

8. Write a function that does the same as the previous exercise, but adds up only

9. Write a function that takes in three double parameters and returns the smallest of the three values?

9. Write a function that takes in three double parameters and returns the smallest of the

10. Write a function that takes in three integer parameters and returns true if they are all even numbers, and false otherwise

10. Write a function that takes in three integer parameters and returns true if they are