Question: Write a C++ program to display first n prime numbers. The program must contain following method booleanisPrime( int n) which checks to see whether the
Write a C++ program to display first n prime numbers. The program must contain following method booleanisPrime( int n) which checks to see whether the number passed to the method is prime or not. this method is invoked to display first n prime numbers, in case user enters 0, the program exits.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
