2007 – 4
Si consideri la seguente funzione int ES4(int x) { if(x/10 == 0) return x; else return x%10+ES4(x/10); } Dire cosa restituisce l’invocazione ES4(ES4(731)). Risposte: 2 9 36 nessuna delle precedenti Soluzione: a (2) Osserva ES4(731): 731/10 = 71, restituisce 731%10+ES4(731/10), 1+ES4(73) ES4(73): 31/10 = 3, restituisce 71%10+ES4(71/10), 7+ES4(3) … Leggi tutto