[Solved]Consider Provided C Code Maincpp File Function Func2 Three Parameters Type Int Int Double Q37168898
Consider the provided C++ code in the main.cppfile:
The function func2 has three parameters of type int, int, anddouble, say a, b, and c, respectively. Write the definition offunc2 so that its action is as follows:
- Prompt the user to input two integers and store the numbers ina and b, respectively.
- If both of the numbers are nonzero:
- If a >= b, the value assigned to c is a tothe power b, that is, aᵇ.
- If a < b, the value assigned to c is b tothe power a, that is, bᵃ.
- If a is nonzero and b is zero, the value assigned to cis thesquare root of the absolute value of a.
- If b is nonzero and a is zero, the value assigned to cis thesquare root of the absolute value of b.
- Otherwise, the value assigned to c is 0. Thevalues of a, b, and c are passed back to the calling environment.After completing the definition of the func2 and writing itsfunction prototype, run your program.
Test Case 1 :
1
2
9
99
Test Case 2:
1
5
8
99
Expert Answer
Answer to Consider the provided C++ code in the main.cpp file: The function func2 has three parameters of type int, int, and doubl… . . .
OR

