#include int sub(char *s){ int i, len; int mod = 0; int minus = 0; for(len=0;s[len] != '\0';len++); for(i=len-1;i>0 ;i--){ printf("%d\n", i); if(minus == 1){ if(s[i] == '0'){ s[i] = '9'; minus = 1; }else{ char num = (char)(s[i] - '0' - 1); s[i] = (char)(num+'0'); minus = 0; } }else{ if( s[i] == '0'){ s[i] = '9'; minus = 1; }else{ char num = (char)(s[i] - '0' - 1); s[i] = (char)(num+'0'); } } if(minus == 0){break;} } for(i=0;i