#include <stdio.h>
#include <ctype.h>
#define SIZE 50
int main(void)
{
int n = 0, i = 0;
char s[SIZE] = "100abc20 defg 748h ijk 7l mno3945pqr";
while(s[i] != '\0')
{
if (isdigit(s[i]))
{
n = n * 10 + (s[i] - '0');
i++;
while (isdigit(s[i]))
{
n = n * 10 + (s[i] - '0');
i++;
}
printf("%i\n", n);
n = 0;
}
i++;
}
return 0;
}
/*
run:
100
20
748
7
3945
*/