Question: You are to write a program named spHWdivision.cpp that will prompt the user for a dividend and divisor and then display the division algorithm's results

 You are to write a program named spHWdivision.cpp that will prompt
the user for a dividend and divisor and then display the division

You are to write a program named spHWdivision.cpp that will prompt the user for a dividend and divisor and then display the division algorithm's results in the sentence format below (four separate examples are shown) If a 17 and d 3, then q 5 and r 2, since 17 - If a 17 and d--3, then q -5 and r 2, since 17- If a - -17 and d 3, then q-6 and r 1, since -17- If a --17 and d--3, then q 6 and r 1, since -17- In testing your program, consider the four possible combinations of positive and negative dividends and divisors (as shown above) The C++ operators for integer division do not conform to the division algorithm. Explain in output displayed to the user of the program when to expect results that disagree with the division algorithm. The program should not attempt to resolve this issue

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!