fn is_prime(x: i32) -> bool{

	// Do this really stupidly. Between 2 -> X-1, check if there any divisor of X
	// which provides a zero modulus. If not, then the number is prime.
	// TODO: speed this up by only checking up to x/2.
	let mut answer : bool = true;
	for divisor in 2 .. x-1{
		if x % divisor == 0{

			answer = false;
		}
	}
	return answer
}
/// Figures out if a number is prime or not (only interesting for an integer)
///
/// Returns whether a number is prime or not
Figures out if a number is prime or not (only interesting for an integer)
Returns whether a number is prime or not
Figures out if a number is prime or not ( only interesting for an integer ) Returns whether a number is prime or not
fn is_prime(x: i32) -> bool{
	// Do this really stupidly. Between 2 -> X-1, check if there any divisor of X
	// which provides a zero modulus. If not, then the number is prime.
	// TODO: speed this up by only checking up to x/2.
	let mut answer : bool = true;
	for divisor in 2 .. x-1{
		if x % divisor == 0{
			answer = false;
		}
	}
	return answer
}
fn is_prime ( x : i32 ) -> bool { // Do this really stupidly. Between 2 -> X-1, check if there any divisor of X // which provides a zero modulus. If not, then the number is prime. // TODO: speed this up by only checking up to x/2. let mut answer : bool = true ; for divisor in 2 .. x - 1 { if x % divisor == 0 { answer = false ; } } return answer }
Figures out if a number is prime or not (only interesting for an integer)
Returns whether a number is prime or not
Figures out if a number is prime or not ( only interesting for an integer ) Returns whether a number is prime or not
x
i32
x
i32