Wednesday, March 20, 2013

Project 6: Prime Number output

Write a void function that uses two nested for loops and the modulus(%) operator to detect and print to a specified output file, the first n prime integers. Recall that a prime number is a number that is evenly divisible only by 1 and itself.
Hint: the function prototype is : void primeGen(int n, ofstream& file);
and a precondition is that file is defined.

Due: next Wednesday, 3/27/13 midnight




No comments:

Post a Comment