Question: Write a C + + program q 1 . cpp that loops forever and asks the user to enter 2 numbers n 1 and n

Write a C++ program q1.cpp that loops forever and asks the
user to enter 2 numbers n1 and n2 that are between 100 and 300:
100<= n1, n2<=300
If n1 or n2 is out of range, ignore and read 2 new numbers.
Write to screen all the prime numbers between n1 and n2, inclusive.
Ask the user if they want to repeat.
Write the function bool is_prime(int n) and use it in the question

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!