Question: Instructions Consider the provided C + + code in the main.cpp file: The function func 2 has three parameters of type int, int, and double,

Instructions
Consider the provided C++ code in the main.cpp file:
The function func2 has three parameters of type int, int, and double, say a, b, and c, respectively. Write the definition of func 2 so that its action is as follows:
Prompt the user to input two integers and store the numbers in a and b, respectively.
If both of the numbers are nonzero:
If ab, the value assigned to c is a to the power b, that is,ab.
If cbabaabcabacbc0a,bc0.00%a, the value assigned tocisbto the power a, that is,ba.
Ifais nonzero and bis zero, the value assigned tocis the square root of the absolute value ofa.
Ifbis nonzero and ais zero, the value assigned tocis the square root of the absolute value ofb.
Otherwise, the value assigned tocis0. The values ofa,b, and c are passed back to the calling environment. After completing the definition of the func 2 and writing its function prototype, run your program.
Task #01: Program runs correctly
Your current grade is: 0.00%
 Instructions Consider the provided C++ code in the main.cpp file: The

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!