[此贴子已经被作者于2016-4-26 09:30编辑过]
#include<stdio.h> int main() { char *p, a[100]; p = a; gets(a); //scanf("%s", p); while (*p != '\0') { if (*p >= '0'&&*p <= '9') { printf("%c", *p); if (*(p + 1) >= '0'&&*(p + 1) <= '9') { ; } else printf(" "); } p++; } return 0; }