Make a program that accepts a numerical value x from 0 to


Question 1:

The roots of the quadratic equation ax^2 + bx +c = 0 are given by

x = (-b+-sqrt(b^2 - 4ac))/2a

a. Develop a Pseudo code description of a program to compute both roots given the values of a,b,and c. Be sure to identify the real and imaginary parts.

b. Write the program described in part a and test it for the following cases:

  1. a = 2, b = 10, c = 12
  2. a =3, b = 24, c = 48
  3. a = 4, b = 24, c = 100

Question 2:

Make a program that accepts a numerical value x from 0 to 100 as input and computes and displays the corresponding letter grade given by the following table.

A. x>=90

B. 80<=X<=89

C. 70<=X<=79

D. 60<=X<=69

F. x<60

  1. Use nested if statements in your program ( do not use elseIf).
  2. Use only elseIf clauses in your program.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Make a program that accepts a numerical value x from 0 to
Reference No:- TGS02778476

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)