C++ program to display prime numbers
In this program, we will read the value of N (range of the numbers) and print the all prime numbers from 2 to N.
To check prime numbers, we are creating a user defined function isPrime() that will take an integer number and return 1 if number is prime and 0 if number is not prime.
Program to display prime numbers in C++
Output
need an explanation for this answer? contact us directly to get an explanation for this answer