1.3.1-1 and Win2K: scanf bug
Keith Frost
keithf@runbox.com
Thu May 24 15:19:00 GMT 2001
keith@ORION ~
$ cat test.c
#include <stdio.h>
int main (int argc, char *argv[])
{
int i;
float x;
for (i=0; i<5; i++)
{
printf("Enter a number\n");
scanf("%f", &x);
printf("%g\n", x);
}
}
keith@ORION ~
$ gcc -o tst test.c
keith@ORION ~
$ ./tst
Enter a number
0.012342
12342
Enter a number
1.33525e4
133525
Enter a number
0.032525e15
9
Enter a number
1.1525e-12
11525
Enter a number
0.000315252
315252
keith@ORION ~
$ gcc --version
2.95.3-4
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list