Hello, I got a task to do in my university studies, and I don't have any idea how to do it,may somebody help me ? So the task is to make an array and make a program that checks if there is any numbers that repeats more then 2 times .
I got the basic code written here that I should be using :
So the task is to make an array and make a program that checks if there is any numbers that repeats more then 2 times
Please clarify. Do you want an answer of simply "true" or "false" or do you want to output those particular numbers. Or do you want to output how many numbers fall into that category.
What precisely does "repeats more than 2 times" mean? Does it mean at least 2 or does it mean at least 3 or does it mean at least 4 occurrences of the same number?
On the whole it is usually best to post your original assignment verbatim.
If you only need whether any numbers repeat then there are far faster means of doing it.