1.Write a program to print a two-dimensional Square Root Table as shown below, to provide the square root of any number from 0 to 9.9. For example, the value x will give the square root of 3.2 and y...

1.Write a program to print a two-dimensional Square Root Table as shown below, to provide the square root of any number from 0 to 9.9. For example, the value x will give the square root of 3.2 and y the square root of 3.9.

                                                     Square Root Table


2. Write a program to compute the real roots of a quadratic equation


ax2 + bx + c = 0


The roots are given by the equations


The program should request for the values of the constants a, b and c and print the values of


x1 and x2. Use the following rules:


(a) No solution, if both a and b are zero


(b) There is only one root, if a = 0 (x = –c/b)


(c) There are no real roots, if b2 – 4 ac is negative


(d) Otherwise, there are two real roots


Test your program with appropriate data so that all logical paths are working as per your


design. Incorporate appropriate output messages.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here