Question: CPS 1231 Chapter 6 lab 2 Fall 2017 Below is a program which calculates and prints 10 prime numbers starting with the number 2. Change

 CPS 1231 Chapter 6 lab 2 Fall 2017 Below is a

CPS 1231 Chapter 6 lab 2 Fall 2017 Below is a program which calculates and prints 10 prime numbers starting with the number 2. Change the program so that it does the following: 1) It asks the user for the starting number 2) It asks the user for the number of primes to print. 3) It writes a method, printPrimes. 4) The method printPrimes will: a. Print the number of primes requested by the user b. Starting with the first prime greater than or equal to the starting number public class PrimeNumbers ( public static void main(String[] args) int count 0 int number = 2; while (count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!