Write function headers for the following: a. A function named check() that has three parameters. The first parameter should accept an integer number, and the second and third parameters should accept a double-precision number. The function returns no value. b. A function named findAbs() that accepts a double-precision number passed to it and returns its absolute value. c. A function named mult() that accepts two floating-point numbers as parameters, multiplies these two numbers, and returns the result.
Write function headers for the following:
a. A function named check() that has three parameters. The first parameter should accept an integer number, and the second and third parameters should accept a double-precision number. The function returns no value.
b. A function named findAbs() that accepts a double-precision number passed to it and returns its absolute value.
c. A function named mult() that accepts two floating-point numbers as parameters, multiplies these two numbers, and returns the result.
d. A function that produces a table of the numbers from 1 to 10, their squares, and their cubes. No arguments are to be passed to the function, and the function returns no value.
e. Write a function named rightTriangle() that accepts the lengths of two sides of a right triangle as the arguments a and b. The function should determine and return the hypotenuse, c, of the triangle. (Hint: Use Pythagoras’ theorem, )
Trending now
This is a popular solution!
Step by step
Solved in 4 steps