Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1. int deep = 1;
  2.  
  3. public void printarPaiFilhos(pai, deep)
  4. {
  5.     print (deep * "-") + pai.nome
  6.  
  7.     if (!pai.listaFilhos.IsEmpty())
  8.     {
  9.         foreach filho em listaFilhos
  10.         {
  11.             printarPaiFilhos(filho, deep+1);
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement