Totem's Lair Forum

Reply
Funzioni ricorsive
view post Posted on 28/5/2009, 14:59Quote
Avatar

programmatore

Group: Member
Posts: 73


Status: Offline: ultima azione eseguita il 8/1/2010, 15:12


Leggendo la guida non ho ben capito cosa sono le funzioni ricorsive e come utilizzarle. Qualcuno me lo potrebbe spiegare meglio?
Grazie

SC

Simone Cassin Website => Programmazione C++, Pascal, PHP, Html, Css e molto altro!
 
Message Email WEB Top
view post Posted on 21/6/2009, 12:34Quote
Avatar

L'unico, il vero Totem

Group: Administrator
Posts: 841
Location: Dall'insieme C


Status: Offline: ultima azione eseguita il 18/11/2009, 16:57


Una funzione ricorsiva è una funzione che richiama se stessa nel proprio corpo. Esempio:

CODICE
Function Fattoriale(ByVal N As Int32) As Int32
 If N = 1 Then
   Return 1
 Else
   Return N * Fattoriale(N - 1)
 End If
End Function

 
Message Email MSN Top
1 replies since 28/5/2009, 14:59
 
Reply

load
Fast reply

 
 
 

Enable emoticons
Clickable Smilies
Show All


Nickname:      Email: