Lottery schemes

There are many lottery schemes available across the world. Write a MIPS Assembly language program that will calculate the odds of winning the Jackpot prize. For example:o The Euro Millions lottery requires matching 5 numbers from a pool of 50 numbers and matching 2 numbers from a second pool of 11 numbers.o The Mega Millions lottery requires matching 5 from 75 and 1 from 15.o The Thunderball lottery requires matching 5 from 39 and matching 1 from 14.o The PowerBall lottery requires matching 5 from 69 and 1 from 26.o The Lotto lottery requires matching 6 from 59.The subroutine example on the following page, calculates the Factorial of an input integer.Starting with the code in the example, write a correct program in MIPS - QtSpim assembly language that:1) Calculates the odds of winning any of the lottery jackpot grand prizes.2) The calculated value is to be displayed on the QtSpim console screen with an appropriate commentary text. Such as “The odds are 1 in nnnn.”3) The program is to accept as input: An integer representing the large pool of possible numbers. A second integer representing the count of numbers to be selected from the large pool. An integer representing the size of the second pool of numbers. A fourth integer representing the count of numbers to be selected from the second pool.4) Test your program by calculating the odds of choosing a set of 2 numbers from a pool of 6 numbers. The value is “1 in 15”. Test other combinations.Note: Because the largest MIPS single precision integer value will not hold the value of morethan 12!, you will need to use some algebra to simplify the calculations. With thesimplifications, all of the math can be done using the integer multiply and divide instructions.Your program should display a message when it stops.Use the System Service calls on page A-44 of the textbook for the input and output.The work products of this assignment are:1) A copy of the source program text file.2) Screen captures showing test output results.