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

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