this function :

```
unsigned short str_num (char str[]){
unsigned char i=0;
unsigned char len=strlen(str);
unsigned short output=0;
while(str[i]) {output+=(str[i]-'0')*pow(10,len-i-1); i++;}
return output;
}
```

str_num("5") returns 5 str_num("55") returns 5 str_num("555") returns 554? str_num("1247") returns 1246?

why is the last number missing one for numbers superior than 99?