func CollatzConjecture(number int) (int, error) {
	if number < 1 {
		return 0, fmt.Errorf("%d is not greater than one", number)
	}
	stepCount := 0

	for {
		if number == 1 {
			break
		}
		if number%2 == 0 {
			number /= 2
		} else {
			number = 3*number + 1
		}
		stepCount++
	}
	return stepCount, nil
}
// CollatzConjecture takes a number and runs it through the 3n+1 problem.
// Returns an error if the number is less than one.
CollatzConjecture takes a number and runs it through the 3n+1 problem.
Returns an error if the number is less than one.
// CollatzConjecture takes a number and runs it through the 3n + 1 problem . // Returns an error if the number is less than one .
func CollatzConjecture(number int) (int, error) {
	if number < 1 {
		return 0, fmt.Errorf("%d is not greater than one", number)
	}
	stepCount := 0
	for {
		if number == 1 {
			break
		}
		if number%2 == 0 {
			number /= 2
		} else {
			number = 3*number + 1
		}
		stepCount++
	}
	return stepCount, nil
}
func CollatzConjecture ( number int ) ( int , error ) { if number < 1 { return 0 , fmt . Errorf ( " " , number ) } stepCount := 0 for { if number == 1 { break } if number % 2 == 0 { number /= 2 } else { number = 3 * number + 1 } stepCount ++ } return stepCount , nil }
CollatzConjecture takes a number and runs it through the 3n+1 problem.
CollatzConjecture takes a number and runs it through the 3n + 1 problem .