static int nth_term ( int a , int b , int n ) {
  int z = 0 ;
  if ( n % 6 == 1 ) z = a ;
  else if ( n % 6 == 2 ) z = b ;
  else if ( n % 6 == 3 ) z = b - a ;
  else if ( n % 6 == 4 ) z = - a ;
  else if ( n % 6 == 5 ) z = - b ;
  if ( n % 6 == 0 ) z = - ( b - a ) ;
  return z ;
}

static int nth_term ( int a , int b , int n ) { int z = 0 ; if ( n % 6 == 1 ) z = a ; else if ( n % 6 == 2 ) z = b ; else if ( n % 6 == 3 ) z = b - a ; else if ( n % 6 == 4 ) z = - a ; else if ( n % 6 == 5 ) z = - b ; if ( n % 6 == 0 ) z = - ( b - a ) ; return z ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (unary_expression operand: (identifier)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (unary_expression operand: (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (unary_expression operand: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (return_statement (identifier))))