Question: Write a program. The program should contain two functions. 1. In main(), you ask the user for a value. 2. The sq() function should return
Write a program. The program should contain two functions. 1. In main(), you ask the user for a value. 2. The sq() function should return the square of the integer passed to it. (The sq() function should NOT print the value, but should return the value to main(), and main() will print the value.). 3. The cube() function should return the cube of the number passed to it. (The cube() function should NOT print the value, but should return the value to main(), and main() will print the value.). 4. Be sure to prototype all functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
