Given an array of length 7 containing integers from 1 to 10,determine if it cont
ID: 3615894 • Letter: G
Question
Given an array of length 7 containing integers from 1 to 10,determine if it contains any duplicates. Write a program that readsthe 7 integer numbers and store them in the array. Then the programshould check if there are any numbers that appear twice or more andoutput the message “There are duplicates” or “Noduplicates”.
For example if the arrayx contains the numbers2,3,8,2,3,6,2 then the program prints the message“There areduplicates”.
OR
if the array x contains the numbers2,5,8,9,3,6,1 then the program prints the message“No duplicates”.