Question: The efficient prime number generation in C. I need with help with creating a fast algorithm in C. Note that lowerBound and upperBound are set
The efficient prime number generation in C.
I need with help with creating a fast algorithm in C. Note that lowerBound and upperBound are set via the command line, such that running the code takes the form "./filename lower upper"
------------------------------------------------------------------
#include
generatePrimes(int lowerBound, int upperBound){ /** * Write your code here * */ }
int main ( int argc, char *argv[] ){
if(argc != 3) { printf("Only enter two integer arguments, please"); } else{ int lowerBound = atoi(argv[1]); int upperBound = atoi(argv[2]); generatePrimes(lowerBound, upperBound); }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
