prova ad usaro atoi che converte un carattere in un numero . . .