Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Mark 6 is a lottery game that draws unique balls out of a pool of 49 balls. The balls are numbered from 1 to
Mark 6 is a lottery game that draws unique balls out of a pool of 49 balls. The balls are numbered from 1 to 49. Some VBA code has been vwritten to mimic the Mark 6 lottery game by drawing 6 unique numbers from 1 to 49 into cells A1 to A6. Here is the code: Sub Mark6() Dim Number As Integer, Total As Integer Dim Test As Integer, TestResult As Boolean Range ("Al:A6").Clear Total = 1 Do while Total < 6 Number = Int(Rnd()49) + 1 TestResult = Blank 1 If Total >1 Then For Test = 1 To Total - 1 If Number = Cells(Test, 1).Value Then TestResult = Blank 2 End If Next Test End If If Not TestResult Then Cells(Total, 1).Value = Number Total = Total + 1 End If Loop End Sub What is the code you need to put in each blank above so that the code can draw 6 unique numbers out of 1 to 49 and put them in cells A1 to A6? You need to write the answers clearly in the boxes below. Do not write any spaces in the answers. For example, if you need to write an expression such as A+ B. you will write A+B without any spaces in between. Blank 1 is Blank 2 is
Step by Step Solution
★★★★★
3.45 Rating (171 Votes )
There are 3 Steps involved in it
Step: 1
Short Answer Blank1 False Blank2 True Detailed Answer While reading the explanation it is recommended that the student should keep the code nearby for their reference purpose VBA code in the question ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started