Write a program that generates N random numbersbetween 1 and 15 (N is entered by
ID: 3610986 • Letter: W
Question
Write a program that generates N random numbersbetween 1 and 15 (N is entered by the user). The program must thenprint the generated numbers to the screen and only keep thenumbers less than or equal 10. Finally, your program must count theoccurrences of each generated number within the new list and printthe counts along with the final array elements.
Sample output:
Enter N: 20
20 Random numbers generated:
10 3 15 3 1 1 2 14 12 5 5 7 7 8 10 2 12 11 10 9
Final List:
10 3 3 1 1 2 5 2 7 7 8 10 2 10 9
Count 1: 2
Count 2: 3
Count 3: 2
Count 4: 0
Count 5: 1
Count 6: 0
Count 7: 2
Count 8: 1
Count 9: 1
Count 10: 3