Example:

User entered 3 months gym subscription for 120 KD plan.

The output:

Month number 1 the discount percentage is 0% and the discount amount is 0KD

Month number 2 the discount percentage is 5% and the discount amount is 6KD

Month number 3 the discount percentage is 10% and the discount amount is 12KD


Answer:- 


Sub cal_dis() ' Function declaration

Dim month, price, discount As Integer, dicounted_amt As Integer

month = Range("B1") ' Assigning values

price = Range("B2") ' Assigning values

discount = ((month - 1) * 5)

dicounted_amt = ((price * discount) / 100)

MsgBox ("Month number is " & month)

MsgBox ("the discount percentage is " & discount)

MsgBox ("the discount amount is  " & dicounted_amt)  

End Sub

    For Detailed Answer or Copy  of file

    WhatsApp  at +91-91311223317

    We Provide help with assignments all over the world follow us.