Azienda coinvolta
How do reverse a number (like 1284 to 4821) without resorting to string manipulation?
Anonimo
int x, y; y = 1284; while (0 != (x = mod y by 10)) { stack,push(x) y /= 10 } x = 0; while (null != (y = stack.pop())) x = (x *10) + y x == 4821
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.