Question: ( 1 ) Program Assignment instructionWrite a C + + program following the specification given below:A lottery ticket buyer purchases 2 0 tickets a week,
Program Assignment instructionWrite a C program following the specification given below:A lottery ticket buyer purchases tickets a week, always playing the same twenty digit lucky combinations, given below.Write a program, named YourFirstNameLastNameProg that initializes an array with numbers read from a data file, MyLuckyNums.txt create the file in NotePad for you to test your program and then let the player enter this weeks winning digit string. The program should perform a binary search through the list of players numbers and report whether or not one of the tickets is a winner this week. Here are the numbers to be entered into MyLuckyNums.txt:Start with completing the top documentation, as indicated in examples given in WEEK TWO.Include the following functions:readPlayersNumsstring int: function to read the twenty digit players numbers from the file MyLuckyNums.txt into the array. This numbers are not sorted.insertionSortstring int: function to sort the string numbers using the insertion sort.thisWeeksNum: function to prompt and input this week's winning digit stringnumber, Return the winning number to mainnumValidationstring: function validates that week's winning digit string actually has five digits. If not, ask the user to reenter five digits.binarySearchstring string, int: function to search the array of the twenty digit player's numbers with this week's winning digit stringnumber to see if there is a match. Return a boolean value, if the player won or not won this week's lottery run.winOrNowinbool: function that will accept the value from the binarySearch function and display one of the following message: "You are a WINNER!!!" or "Sorry not this time. Maybe next time." Please make sure to use the format and programming style illustrated by the author in the textbook.Be consistent with the coding structures illustrated in the current textbook., covered in this course
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
