fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int x;
  6. char s[2];
  7.  
  8. while (1)
  9. {
  10. switch (scanf("%d%1[C]", &x, s))
  11. {
  12. case -1:
  13. return 0;
  14. case 2:
  15. printf("%d\n", x);
  16. break;
  17. default:
  18. scanf("%*[^-+0-9]");
  19. }
  20. }
  21. }
  22.  
Success #stdin #stdout 0s 2172KB
stdin
9237492572vcs 100C msdaa aw 0C
ab123Cd
stdout
100
0
123