1. Write a program that accepts as input the mass, in grams, and density, in grams per cubic
centimeters, and outputs the volume of the objects using the formula: volume = mass/density.
Format your output to two decimal places
2. Interest on a credit card‘s unpaid balance is calculated using the average daily balance. Suppose
that netBalance is the balance shown in the bill, payment is the payment made, d1 is the
number of days in the billing cycle, and d2 is the number of days payment is made before billing
cycle. Then the average daily balance is :
averageDailyBalance = (netBalance*d1 – payment *d2)/d1
If the interest rate per month as a fraction is APR/(12*100) where APR is the Annual Percentage
Rate, then the interest on the unpaid balance is:
interest = averageDailyBalance*APR/(12*100)
Write a program that accepts as input your first and last name, the credit card number,
netBalance, payment, d1, d2, and APR, and outputs the interest.
Your program outputs must be similar or better than the screenshots included in the assignment