Problem 5: Write a C program that prompts the user to enter two positive integers m and n where m n then output all prime numbers between m and n, inclusive. You must write a function isPrime0 that would test a number whether it is a prime number. Sample input/output "C: Users 101512MDesktoplTeachingicourses 1411-116 Programming NHWstHW3 Enter two integers m and n Im K n 3 20 The primes between 3 and 20 are: 3 5 7 11 13 17 19 Process returned 0 X0x0> execution t 13.214 s Press any key to continue
Explanation / Answer
int main() { int low, high, flag, temp; cout > low >> high; //swapping numbers if low is greater than high if (low > high) { temp = low; low = high; high = temp; } cout