84 529
Assignments Done
99,1%
Successfully Done
In March 2020

# Answer to Question #44783 in C# for Aman Kumar Saini

Question #44783
Develop a program that accepts a deposit amount and period of deposit. Calculate the maturity amount after the period of deposit. The bank pays 4% interest per year for any deposits made in the bank.
1
2014-08-08T13:08:55-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace maturity_amount
{
class Program
{
/// <summary>
/// Main method
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
//variable for deposit Amount
double depositAmount;
//variable for period
int period;
//variable for maturity Amount
double maturityAmount=0;
//promt user to enter deposit amount
Console.Write("Enter deposit amount: ");
//promt user to enter period of deposit
Console.Write("Enter period of deposit (in year): ");
maturityAmount = depositAmount;
//calculate maturityAmount
for (int i = 0; i < period; i++) {
maturityAmount += maturityAmount*0.04;
}
//show result
Console.Write("Maturity amount after the period of deposit: \$" + maturityAmount.ToString());
//delay

}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!