Question: Q 1 0 Write a C program that does the following: Accepts a number or - 1 from the user in an infinite loop. Comes
Q Write a C program that does the following:
Accepts a number or from the user in an infinite loop.
Comes out of the infinite loop and exits if the user types
Calls a function squared that accepts a number and returns its square.
Prints the result of the function called squared
Calls a function cubed that accepts a number and returns its cube.
Prints the result of the function called cubed
Prints an output as shown below.
Enter a number to exit:
The square of is:
The cube of is:
Enter a number to exit:
The square of is:
The cube of is:
Enter a number to exit:
The square of is:
The cube of is:
Enter a number to exit:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
