Suppose you borrow $1000 at 12% annual interest and make monthly payments of $100. Write a C# program to calculate how many months it will take to pay off this loan.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
int mo = 0, intram = 0, bmo = 1000, mpay = 0;
int ram = (bmo * 1 / 100);
for (int i = 1; i <= 30; i++)
{
bmo = intram + bmo;
mpay = mpay + 100;
if (mpay>= bmo)
{
mo = i;
break;
}

}
Console.WriteLine("Months to pay loan will be = " + mo);


Console.ReadKey();

}


}
}


www.ittaleem.com