fork(3) download
  1. #include <stdio.h>
  2. #include <ctype.h>
  3.  
  4. int main(void)
  5. {
  6. int c=0;
  7. double a;
  8. while(c!=EOF)
  9. {
  10. while((c=scanf("%lf",&a))==1)
  11. {
  12. printf(" %lg",a);
  13. while(isspace(c=getchar())&&(c!='\n')&&(c!=EOF)) {}
  14. if((c=='\n')||(c==EOF)) break;
  15. ungetc(c,stdin);
  16. }
  17. printf(" end of row\n");
  18. }
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 2296KB
stdin
1 2 3 4 5 6
7 8
12 13 14 15
stdout
 1 2 3 4 5 6 end of row
 7 8 end of row
 12 13 14 15 end of row