Question: 1. Create a Java program that is described below. 2. Make sure that the input and output are EXACTLY as shown in the Sample
1. Create a Java program that is described below. 2. Make sure that the input and output are EXACTLY as shown in the Sample below NO DISCUSSIONS WITH YOUR COLEAGUES ARE ALLOWED The solutions for the equation ax + bx + c = 0 are: x1 = -b+d and x2 2a -b-d 2a where d=b2-4ac Write a Java program that enters from the keyboard the values of a, b, c (as integers) and then calculates x1 and x2. Note: for this program one should avoid the cases when d is negative and the solutions are imaginary. Sample input and output: Enter the value of a: 2 Enter the value of b: -4 Enter the value of c: 1 x1 = 1.7071067811865475 x2 = 0.2928932188134524
Step by Step Solution
There are 3 Steps involved in it
Heres the Java program implementing the described functionality import ... View full answer
Get step-by-step solutions from verified subject matter experts
