1.The requirements for the algorithms in Figs. 9.1 and 9.2 specified that the divide-by-zero error need not be considered. Modify the algorithm from Fig. 2. so that it will respond effectively to such...

1.The requirements for the algorithms in Figs. 9.1 and 9.2 specified that the divide-by-zero error need not be considered. Modify the algorithm from Fig. 2. so that it will respond effectively to such an error . You may assume that all other aspects of user input will be legal. In the case where division by zero is attempted, the algorithm shall print a brief error message to the user and prompt the user for a nonzero divisor. Then, evaluate best case, worst case, and average case work for the modified algorithm. For average work, assume a random distribution of operators and a random distribution of single-digit ( 0 to 9)operands .

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here