Ecaterina Posted July 16, 2016 Report Posted July 16, 2016 Cum se poate elimina ultima cifra a unui numar, dar fara a folosi /10, ci doar scaderi repetate? Multumesc
Moderators Courage Posted July 16, 2016 Moderators Report Posted July 16, 2016 int eliminare_ultima_cifra(int numar) { int contor = 0; while(numar > 9) { numar -= 10; contor++; } return contor; } Ceva de genu' cred. 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now