int next_term (int current_term) { for (current_term; current_term >=1; current_term--) { if ( current_term % 2 == 0) current_term = current_term / 2; if ( current_term % 2 > 0) current_term = (current_term * 3) + 1; cout << current_term << " "; } return (current_term); }

** Edit **