QuestionQ73

VerifiedReviews

Given the following pseudocode for a program that solves quadratic equations:

Question Image

Which of the following checklist items is MOST likely to reveal a problem in this program?

Explanation

A quadratic-equation solver must ensure that the leading coefficient a is nonzero before calculating roots, because the quadratic formula divides by 2a. Without that validation, an input of a = 0 causes a division-by-zero error.

Community Discussion

No comments yet. Be the first to start the discussion!