- 880 名前:デフォルトの名無しさん mailto:sage [2007/06/22(金) 17:51:22 ]
- >>879
こんなかんじ。 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main(void) { char buff[0x1000], *p, *q; unsigned char c; while (fgets(buff, sizeof buff, stdin)) { for (p = buff; c = *p++; ) { if (isdigit(c)) { printf("%ld\n", strtol(p-1, &q, 10)); p = q; } } } return 0; }
|

|