using System;
public class Class1 {
public static void Main(string[] args) {
Console.Write("Enter principal:");
string sPrincipal = Console.ReadLine();
decimal mPrincipal = decimal.Parse(sPrincipal);
Console.Write("Enter interest:");
string sInterest = Console.ReadLine();
decimal mInterest = decimal.Parse(sInterest);
decimal mInterestPaid;
mInterestPaid = mPrincipal * (mInterest / 100);
decimal mTotal = mPrincipal + mInterestPaid;
Console.WriteLine("Principal = " + mPrincipal);
Console.WriteLine("Interest = " + mInterest + "%");
Console.WriteLine("Interest paid = " + mInterestPaid);
Console.WriteLine("Total = " + mTotal);
}
}
|