Course Hero Logo

List.java - package module9 import java.util.Random ...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 out of 1 page.

package module9;import java.util.Random;import java.util.Scanner;public class Evangelista_List {public static void main(String[] args) {Random rand = new Random();Scanner evangelista = new Scanner(System.in);// User inputs number of elementsSystem.out.print("Input the number of elements: ");int size = evangelista.nextInt();int numbers[] = new int[size];int i;// value of elements are until 69 onlyfor (i = 0; i < numbers.length; i++) {numbers[i] = rand.nextInt(6)+5;} // system prints out first set of random numbersSystem.out.print("List A: \n");for (i = 0; i < numbers.length; i++) {System.out.println(numbers[i] + " ");}
End of preview. Want to read the entire page?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
N/A
Tags
Randomness, Evangelista, public class Evangelista

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture