2007/08 – Fase scolastica – 06

Si consideri la funzione

Function ES6(x: Integer; y: Integer): Integer;
Begin
   If(x = 0) And (y = 0) Then
      ES6:=0
   Else if(x Mod 10 < y Mod 10) Then
      ES6:= ES6(x, y div 10)
   Else if(x Mod 10 > y Mod 10) Then
      ES6:= ES6(x div 10, y)
   Else
      ES6:=x Mod 10+10*ES6(x Div 10, y Div 10);
End;

Dire cosa restituisce la chiamata ES6(3467, 5678).

Risposte:

  1. 18
  2. 67
  3. 2367
  4. nessuna delle precedenti.