Pergunta de entrevista da empresa National Instruments

Write code to get the average value from a tree.