This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// findNextPrime.cpp - return the next larger prime number | |
// (input taken from command line args or from stdin) | |
#include <iostream> | |
int findNextPrime(int n); // given a number n, find the next larger prime number above n | |
bool isPrime(int n); // given a number n, determine whether it is prime | |
int main(int argc, char**argv) | |
{ | |
int input; |