Write a program (Program A) that creates a linked list of 100 nodes, each containing a
random positive integer between 0 and 99. The program must provide the user with four
choices: Build the list; Print out the list; Search the list; and Quit. Hint: Use a
switch structure in a while loop, where each of the first three choices in the switch
leads to a UFD that does the work (Build, Print out or Search the list). Of
course, Quit is trivial and does not need a UFD.
1) (1 point) Build the list and assigns a value (random integer between 0 and 99) to each
node.
2) (1 point) Prints out the contents of the list to screen. For example: (you can either start
from 0 or from 1- it doesn't matter)
Node #1 contains the value of 71
Node #2 contains the value of 36
Node #3 contains the value of 19
.\
.\
.\
Node #100 contains the value of 27
3) (1 point) Asks the user what number she wishes to find in the list and searches for the
first instance of that number. The search must return (i.e., print to screen) the node
number in which the entry was found, so the program must keep count of the nodes it
has visited. Assume the list is unordered (which of course, it is). If the number is not
found in the list, it must say: The search has failed.
For output, the program must print out one line indicating that the value sought was
found in the nth node. For example:
Please enter the number to be sought in the list:
>> 15
The number 15 was found in node #81