home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 334_02 / scanf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-04  |  254 b   |  13 lines

  1. #include <stdio.h>
  2.  
  3. main()
  4. {
  5.     float x,y;
  6.  
  7.     sscanf("0 12", "%f %f\n", &x, &y);
  8.     printf("%f, %f  should be %f, %f\n", x, y, 0., 12.);
  9.  
  10.     sscanf("00 12", "%f %f\n", &x, &y);
  11.     printf("%f, %f  should be %f, %f\n", x, y, 0., 12.);
  12. }
  13.