practice: random number sorting

Write a program that:

  1. Creates an integer array of size 10.
  2. Fills the array with random numbers between 1 and 100.
  3. Prints the array contents to the console.
  4. Sorts the array with any sorting algorithm of your choice.
  5. Prints the array contents again.
  6. Asks the user to pick a number to search for.
  7. Searches the array for the given number.
  8. Prints the location of the number or that it was not found.

Example input and output:

Unsorted array:
84 68 55 93 21 23 48 82 53 6

Sorted array:
6 21 23 48 53 55 68 82 84 93

What value are you looking for? 23

The value is in element 2

Press any key to continue . . .