C++/ptl/HashTable.hpp
// Finds the first prime number just before integer n

Finds the first prime number just before integer n
Finds the first prime number just before integer n
int HashTable::firstPrimeBefore (int n) const
	{
		for( int i=n-1; ; i-- )
			if( isPrime(i) )
				return i;
	}
int HashTable :: firstPrimeBefore ( int n ) const { for ( int i = n - 1 ; ; i -- ) if ( isPrime ( i ) ) return i ; }
Finds the first prime number just before integer n
Finds the first prime number just before integer n