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”.
Explanation / Answer
please rate - thanks #include using namespace std; int main() {int array[10],n=7,i,j,dup=0; for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.