// copy doubles from standard input to standard output #include int main( void) { int s; // scanf return status double d; while( 1) // until end-of-file or error { s = scanf("%lf",&d); // try to read one double if( s != 1) // could not read one double, must be end-of-file or error break; printf( "%g\n", d); } return 0; }