1 #include <stdio.h> 2 int skip(){ 3 scanf("%*[^0-9]"); 4 return 1; 5 } 6 int main(){ 7 int n; 8 while (skip() && scanf("%d", &n)!=EOF) 9 printf("%d\n", n); 10 return 0; 11 }
参考:
1 #include <stdio.h> 2 int skip(){ 3 scanf("%*[^0-9]"); 4 return 1; 5 } 6 int main(){ 7 int n; 8 while (skip() && scanf("%d", &n)!=EOF) 9 printf("%d\n", n); 10 return 0; 11 }
参考:
转载于:https://www.cnblogs.com/Bird-Xu/p/7847132.html