Question: Implement main Input: Either nothing, or int argc, char* argv[] (which represent the command line arguments) Output: Returns an integer representing the exit status (0
Implement main
Input: Either nothing, or "int argc, char* argv[]" (which represent the command line arguments)
Output: Returns an integer representing the exit status (0 for success).
Side effects: Gets two integers from the user representing a range and displays the prime numbers in that range.
Use getInt to display a prompt ("Enter starting integer (1 - 100): ") and get an integer from the user within the range 1 through 100. Store the result.
Use a stringstream to create a string prompt for the second user input. Example: stringstream s; s << "Enter ending integer (" << (min+1) << " - 1000): "; Then use s.str() wherever you need to turn it into a regular C++ string object
Use getInt to display a prompt for the ending value in the range. Use the custom prompt you created in the last step. The range for this value should be from 1 greater than the previous number the user typed in through 1000. Store the result.
Display a line stating what will be displayed next (including the first and last values in the range).
Create a loop which will iterate through all the values in the range. For each value, call isPrime with that value to determine if the value is prime. If it is prime, then display it followed by a newline.
Return a success (0) exit status.
Need help with this part of my program please!!!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
