c++编程

360U3138186058 |浏览260次
收藏|2019/06/03 23:21

满意回答

2019/06/03 23:34

编译通过的程序,参考

whoami1978

其他回答(1)
  • #include <stdio.h>int main(){ printf("Please input string:\n"); char buf[1024]; scanf_s("%s", buf, 1024); char out[1024]; int n = 0; for (int i = 0; i < 1024; i++) { if (buf[i] == 0) break; if (buf[i] >= '0' && buf[i] <= '9') { out[n++] = buf[i]; } } out[n] = 0; printf(out); getchar(); getchar();}
    回答于 2019/06/03 23:49
0人关注该问题
+1

 加载中...