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?)

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).

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...)

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.

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