title: Simple Program Does Not Work Correctly
body: <pre><code>import java.util.Scanner;
  
  public class Welcome
  {
      public static void main(String[] args)
      {
          Scanner input = new Scanner(System.in);
  
          double a = input.nextDouble();
          double b = input.nextDouble();
          double c = input.nextDouble();
  
          double rezultat = - b + Math.sqrt(Math.pow(b, 2) - 4 * a * c) / 2 * a;
  
          System.out.println(rezultat);
      }
  }
  </code></pre>
  
  <p>I wonder why this code does not work as it should.</p>
  
  <p>Printed result is always: NaN</p>