CPM Homework Banner

Home > PC > Chapter 1 > Lesson 1.2.2 > Problem 1-79

1-79.
  1. PROGRAMMING EXTENSION PROBLEM

    Try your QUADFORM program with the following inputs; a = 1, b = 0, c = 2. Describe what happened and why. The following five lines can be added to your program to fix this problem. Your challenge is to see if you can figure out where to put them and in what order. Ask your teacher for help only after you have entered the lines and tested the program several times. Homework Help ✎

    1. :If D < 0

    2. : Goto 3

    3. : Stop

    4. : Lbl 3

    5. : Disp “COMPLEX ROOTS”

The program will “crash” since the program tries to take the square root of a negative number.