Vai al contenuto

Programmare con Pascal

Sezione di VALCON.IT

  • Home
  • Programmare
  • Problemi risolti
  • RISORSE

2007/08 – Fase scolastica – 04

16/10/2014 di admin

Si consideri la seguente funzione

Function ES4(x: Integer): Integer;
Begin
   If(x Div 10 = 0) Then
      ES4:=x
   Else
      ES4:=x Mod 10+ES4(x Div 10);
End;

Dire cosa restituisce l’invocazione ES4(ES4(731)).

Risposte:

  1. 2
  2. 9
  3. 36
  4. nessuna delle precedenti
Categorie OII - Fase Scolastica
2007/08 – Fase scolastica – 03
2007/08 – Fase scolastica – 05
  • Temporaneo
  • Decrescita programmata
  • Aritmetica: potenza
  • Aritmetica: prodotto
  • Aritmetica: somma
© 2025 Programmare con Pascal • Creato con GeneratePress