while ("numero_corrente<23")

no!!!!

while (numero_corrente<23)

cosi dovrebbe funzionare