fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int i,x;
  6. char row[16];
  7. for(i=0;i<7;++i)
  8. {
  9. *row=0;
  10. fscanf(stdin,"%15[^\n]s",&row);
  11. fgetc(stdin);
  12. x=0;
  13. sscanf(row,"%d",&x);
  14. printf("%d\n",x);
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2164KB
stdin
3

5
6

7
stdout
3
0
5
6
0
7
0