Page t006, go to NEXT, PREVIOUS, INDEX

More on I/O


Controlling end-of-line

      /* Print the equation coefficients of a*x +b*y +c = 0 */
      printf ("Coefficients: %f, %f, %f\n", a, b, c);

      /* Compute and print the x-intercept */
      printf ("x-intercept: ");
      if (a != 0)
      { printf ("%f, ", -c/a);
      }
      else
      { printf ("none, ");
      }

C Course, 15-jan-1997, Peter Klok, pfk@hef.kun.nl