*someone can help me to answer this question.

Create an array that can hold ten integers, and fill each slot with a different random value from 1-50. Display those values on the screen, and then prompt the user for an integer. Search through the array, and if the item is present, say so. It is not necessary to display anything if the value was not found. If the item is in the array multiple times, it's okay if the program prints the message more than once.
Array: 45 39 32 12 44 50 26 42 16 20
Value to find: 42
42 is in the array
Array: 45 39 32 12 44 50 26 42 16 20
Value to find: 43
Array: 24 30 31 24 32 33 34 24 35 26
Value to find: 24
24 is in the array.
24 is in the array.
24 is in the array.

I found no question. There appears to be an assignment but the question is missing. You may have to add your question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.