Note: For all the questions, please provide both the source code as well as the output.Points possible for hw4: 3 pts.Q1. The use of ScannerQ1 Write a program that prompts the user to enter two integers. Print the smaller of the two numbers entered. You’ll need to use a Scannerand a Mathmethod.Q2. Fixing issueQ2.1 What is the output of the following program? Why?
Q3. CalculationQ3.1 An annuity (sometimes called a reverse mortgage) is an account that yields a fixed payment every year until it is depleted. The present value of the annuity is the amount that you would need to invest at a given interest rate so that the payments can be made.