Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ex6_5 {
- public static void main(String[] args)
- {
- //creat scanner object
- Scanner kb = new Scanner(System.in);
- //create an array to hold the input numbers
- int [] inNum = new int [10];
- int [] checkNum = new int[10];
- //get length of the array
- int arLen = inNum.length;
- //create a looop to get user input into the array
- for (int i = 0; i <= arLen; i++)
- {
- //get user input
- System.out.println("Please enter an Integer: ");
- inNum[i] = kb.nextInt();
- //make a copy of the array
- int[] newAr;
- newAr = i
- }
- for (int k = 0; k <= arLen ;k++)
- {
- //compare if
- }
- //print out the array test!
- System.out.println("Inside array"+inNum[k]);
- }
- }
Add Comment
Please, Sign In to add comment