Suppose an annual inflation rate 4%. Because of inflation, an item that costs $1.00 today will cost $1.04 one year from now. Write a C# program that inputs the cost of an item and outputs its cost three years from now.


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

namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
double cos, intr = 0.04, tint;
int years = 3;
Console.WriteLine("Enter The Cost Of Item :");
cos = double.Parse(Console.ReadLine());
tint = (cos * intr) * years;
cos = cos + tint;
Console.WriteLine("Cost of Item after {0} years= {1}", years, cos);

Console.ReadKey();

}


}
}


www.ittaleem.com