1 2 3 4 5 6 7 8 9
#include <stdio.h> int main(int argc, char **argv) { int c; while((c = getchar()) != EOF) if(isdigit(c) || c == '\n') putchar(c); }