Question: it should be in one class - 2 methood and IN JAVA Write a Prime program that receives an integer from the user and prints:

it should be in one class - 2 methood and IN JAVA
Write a Prime program that receives an integer from the user and prints: All the prime numbers smaller than this number How many prime numbers it found. Sample output Enter a number. The program will print all the prime numbers smaller than this number 50 There are a total of 15 prime numbers Write a Mersenne program that receives an integer from the user and prints: All the Mersenne primes smaller than this number How many Mersenne primes it found. In mathematics, a Mersenne prime is a prime number of the form M_n = 2^n - 1. Sample output Enter a number. The program will print all the Mersenne prime numbers smaller than this number. There are a total of 5 Mersenne prime numbers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
