Something went wrong. Try again.
A collection of my code-golfing attempts.
Something went wrong. Try again.
155 B · 1 line
C
at main
1main(r){char i[99],*t,*p;for(;;){r=0;scanf("%s",i);for(t=strtok(i,"+");t;t=strtok(0,"+")){for(p=t;*p;p++)*p-48u>9?exit(1):0;r+=atoi(t);}printf("%d\n",r);}}