Question: C exercise 4.3 -Write a Pseudo Code and C program that will ask the user for two natural numbers n1 and n2, and then, using
C exercise 4.3
-Write a Pseudo Code and C program that will ask the user for two natural numbers n1 and n2, and then, using a function compute and (optionally) display all the prime numbers between (and possibly including) n1 and n2.
-The function will also count and return how many prime numbers exist between n1 and n2.
-You function must ensure n2 is >= n1. If n2 = n1 then the function simply validates if n1 is a prime number. If n1 > n2 then the program will assume an error and swap n1 and n2 and start calculating.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
