Question: PleAse show codes in java Thanks 1. Write a program which asks the user to enter an integer value, n. Declare an array of int's

PleAse show codes in java
Thanks  PleAse show codes in java Thanks 1. Write a program which

1. Write a program which asks the user to enter an integer value, n. Declare an array of int's of size n. Find every prime number starting with 2, and write each into the next available cell in your array. Repeat this n times until your array is full. Use a while loop to do this. Then, using a for loop, compute the average of your prime numbers. Your n should be a positive integer less than or equal to 1000

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!