// copy x,y points from stdin to stdout // #include #include typedef struct { double x, y; } Point; // a point in 2 dimensions int main( void) { int count; Point p; while(1) // until scanf fails { // try to read a point // count = scanf( "%lf%lf", &p.x, &p.y); // if scanf didn't read 2 values, break out of the loop // if( count != 2) break; printf( "%g %g\n", p.x, p.y); } return 0; }