home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap03 / floats.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-06  |  280 b   |  12 lines

  1. /* floats.c  -- show floating values in regular */
  2. /*              and exponential format          */
  3.  
  4. main()
  5. {
  6.     float f1 = 2500.125, f2 = 0.0033, f3 = -50.99;
  7.  
  8.     printf("%f\t %e\n\n", f1, f1);
  9.     printf("%f\t %e\n\n", f2, f2);
  10.     printf("%f\t %e\n", f3, f3);
  11. }
  12.