Write a program that creates two arrays of size 8 representing card numbers in a game. The valid numbers are between 1 and 9 only. The user must enter 8 valid numbers to fill the first array. Then,...

What is the solution of this problem using java language?Write a program that creates two arrays of size 8 representing card numbers<br>in a game. The valid numbers are between 1 and 9 only.<br>The user must enter 8 valid numbers to fill the first array. Then, the<br>program must generate 8 random numbers to fill the second array.<br>The program must display the numbers generated and then how many<br>matching card numbers (equal value) at the same index in both arrays<br>respectively.<br>Sample run 1:<br>Enter 8 card numbers between 1 and 9:<br>2 1 4 7 3 9 8 5<br>The cards generated by the computer are:<br>5 4 9 2 4 79 2<br>You have 0 matching card (s).<br>Sample run 2:<br>Enter 8 card numbers between 1 and 9:<br>3 45 9 2 8 19<br>The cards generated by the computer are:<br>6 48 85 7 4 5<br>You have 1 matching card (s).<br>Your answer<br>

Extracted text: Write a program that creates two arrays of size 8 representing card numbers in a game. The valid numbers are between 1 and 9 only. The user must enter 8 valid numbers to fill the first array. Then, the program must generate 8 random numbers to fill the second array. The program must display the numbers generated and then how many matching card numbers (equal value) at the same index in both arrays respectively. Sample run 1: Enter 8 card numbers between 1 and 9: 2 1 4 7 3 9 8 5 The cards generated by the computer are: 5 4 9 2 4 79 2 You have 0 matching card (s). Sample run 2: Enter 8 card numbers between 1 and 9: 3 45 9 2 8 19 The cards generated by the computer are: 6 48 85 7 4 5 You have 1 matching card (s). Your answer

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here