static double avgRec ( int a [ ] , int i , int n ) {
  if ( i == n - 1 ) return a [ i ] ;
  if ( i == 0 ) return ( ( a [ i ] + avgRec ( a , i + 1 , n ) ) / n ) ;
  return ( a [ i ] + avgRec ( a , i + 1 , n ) ) ;
}

static double avgRec ( int a [ ] , int i , int n ) { if ( i == n - 1 ) return a [ i ] ; if ( i == 0 ) return ( ( a [ i ] + avgRec ( a , i + 1 , n ) ) / n ) ; return ( a [ i ] + avgRec ( a , i + 1 , n ) ) ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (array_access array: (identifier) index: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))) right: (identifier))))) (return_statement (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))))))