Question: 2 . Write a ( mathbf { C + + } ) function that receives two integer parameters ( mathbf
Write a mathbfC function that receives two integer parameters mathbfn and mathbfr and returns the permutation of the two numbers as given by the following equation:
rn Pfracnnr
The main function should prompt the user to enter two integers and call the permutation function to get the result and display it on the console only when the two integers are nonnegative. Otherwise, the main function displays a warning message. Notice that mathbfn is always the larger number.
begintabularll
hline multicolumnc Sample Output & multicolumnc Sample Output
hline Enter two integers: & Enter two integers:
The permutation & The permutation
hline multicolumnc Sample Output & multicolumnc Sample Output
hline Enter two integers: & Enter two integers:
Wrong Input! & The permutation
hline
endtabular
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
