/* Author: Seth Riedel
 * Purpose: Do the quadratic formula really fast
 * Version 0.5 (test with x^2 - 1 = 0; results should be 1 and -1)
 */
public class QuadraticFormula
{
   public static void main(String[] args)
   {
      //define variables
      double a = 1;
      double b = 0;
      double c = -1;
      double discrim;
      double firstAnswer;
      double secondAnswer;
      //get input (coming in version 1.0)
      //calculations
      discrim = Math.sqrt(Math.pow(b,2) - 4*a*c);
      firstAnswer = (-b + discrim)/(2*a);
      secondAnswer = (-b - discrim)/(2*a);
      //print result
      System.out.printf("The answers are %f and %f.%n",firstAnswer,secondAnswer);
   } //end main method
} //end class
@@ -82,68 +82,73 @@
 ion 
-0.5 (test with x%5E2 - 1 = 0; results should be 1 and -1)%0D%0A */
+1.0 (with input)%0D%0A */%0D%0Aimport java.util.Scanner; //import scanner
 %0D%0Apu
@@ -228,16 +228,80 @@
 %0D%0A   %7B%0D%0A
+      Scanner input = new Scanner(System.in); //create scanner%0D%0A
       //
@@ -336,12 +336,8 @@
 le a
- = 1
 ;%0D%0A 
@@ -353,12 +353,8 @@
 le b
- = 0
 ;%0D%0A 
@@ -370,13 +370,8 @@
 le c
- = -1
 ;%0D%0A 
@@ -468,32 +468,251 @@
 nput
- (coming in version 1.0)
+%0D%0A      System.out.print(%22Enter a value for a: %22);%0D%0A      a = input.nextDouble();%0D%0A      System.out.print(%22Enter a value for b: %22);%0D%0A      b = input.nextDouble();%0D%0A      System.out.print(%22Enter a value for c: %22);%0D%0A      c = input.nextDouble();
 %0D%0A  
@@ -889,32 +889,131 @@
 t result%0D%0A      
+if (firstAnswer == secondAnswer) System.out.printf(%22The answer is %25f.%25n%22,firstAnswer);%0D%0A      else 
 System.out.print

Version 1.0