这有什么办法吗,求解答一下。

img


#include<stdio.h>
#include<stdlib.h>
#include <math.h>
int main()
{
    char s[100];
    gets(s);
    int a=0,b=0;
    int i=0;
    while(i<strlen(s) && isdigit(s[i]))
    {
        a = a*10+(s[i]-'0');
        ++i;
    }
    while(i<strlen(s) && !isdigit(s[i])) i++;
    while(i<strlen(s) && isdigit(s[i]))
    {
        b = b*10+(s[i]-'0');
        ++i;
    }
    
    printf("%d",a+b);
    
    return 0;
}