title: Quadratic equation using conditional operator
body: <p>Can someone explain to me step by step how this program works? It solves a quadratic equation using the conditional operator. But it's a mess.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include &lt;math.h&gt; 
  int main()
  { 
       float a, b, c, d; 
       printf("Introduce the coefficients: a,b,c\n"); 
       scanf("%f %f %f", &amp;a,&amp;b,&amp;c); 
       a? d=b*b-4*a*c, d&gt;=0? 
       printf("x1=%f\tx2=%f\n",(-b- sqrt(d))/2/a, (-b+sqrt(d))/2/a):
       printf("x1=%f+i*%f\tx2=%f-i*%f\n",-b/2/a, sqrt(-d)/2/a,-b/2/a,sqrt(-d)/2/a):
       b? printf("x=%f\n",-b/2/a): c? printf("0 solutions\n"): 
       printf("identity\n"); 
       return 0; 
  }
  </code></pre>