Question: Write a program that takes the following inputs: A float money representing the initial amount of money A boolean isMember that represents the person's membership

Write a program that takes the following inputs: A float money representing the initial amount of money A boolean isMember that represents the person's membership An integer age representing the age of the person An integer paidlastMonth representing the amount paid last month An integer creditScore representing the credit score of the person. The program should calculate the final amount of money only if the person is a member after applying an interest rate based on the following rules: Start with an initial interest rate of 4.5% If the age is greater than 21, add 0.5% to the interest rate, If the paidlastmonth is greater than 100, add 1% to the interest rate Calculate the final amount of money by adding the interest to the initial money using the formula: money (money interestRate 100). Print the calculated final amount of money in two decimal places with the format: "Final money with interest: (amount)" If the person is not a member, print "You are not a member, No interest will be added

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!