Problem 1: Write a program to store 20 integers in an array A of 20 cells. The program should output the following: . the content of A as follows: A[0]-10 AL-2 A12]- 30 I 91-20 .The average of the integers in A The Maximum and Minimum integers in A. The percentage of positive integers in A. Problem 2: Write a program to store N random numbers in an array A, of 50 cells. The random numbers should be generated to be in the range 10-50 The program should output the following . Copy all even numbers in A to a new array Even(then output the content ofeven) . Replace all odd numbers by the last value in the array A Write a program to store in an array A of 100 cells N random numbers in the range1 to 20. The program should prompt the user to choose from the following menu (Write a function to solve each listed task) 1. Output each number in the array and its square root value. 2. Find the maximum and minimum values stored in A 3. Store in an array Prime all the prime numbers stored in A(output Prime) 4. Find the percentage of even integers in A 5. Exit https://d2vlcm61l7u1fs.cloudfront.net/media%2Fc83%2Fc831481d-4328-4126-874b-9d0b628ab07e%2Fimage

Problem 1:
—————————————————————————————————————-
/*
* Code written in java
* Just copy and paste the code to run
*/
public class Problem1 {
public static void main(String[] args) {
//create an array of 20 integers
int a[] = {20, -2, 30, -7, 89, -23, 50, 60, 70, 10, -9, -56, 4, -3, 78, 1001, 54, -10, 44, -21};
System.out.println(“Content of arrays is : “);
for(int i=0; i max)
max = a[i];
if(a[i] = 0)
countPos ++;
}
System.out.println(“Percentage of positive integers is ” + (countPos*100)/20 + “%”);
}
}
Problem 2:
—————————————————————————————————————-
/*
* Code written in java
* Just copy and paste the code to run
*/
import java.util.ArrayList;
import java.util.Random;
public class Problem2 {
public static void main(String[] args) {
//create an array of 50 integers
int a[] = new int[50];
//initialize the array with random integers
Random rand = new Random();
for(int i=0; i even = new ArrayList();
for(int i=0; i max)
max = a[i];
if(a[i] prime = new ArrayList();
for(int i=0; i
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"