This is a C# Program to calculate simple interest.
This C# Program Calculates Simple Interest.
Here Simple interest is determined by multiplying the interest rate by the principal by the number of periods.
Here is source code of the C# Program to Calculate Simple Interest. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
/* * C# Program to Calculate Simple Interest */ using System; namespace Interest { class Program { static void Main(string[] args) { int year; double princamt,rate, interest, total_amt; Console.Write("Enter The Loan Amount : "); princamt = Convert.ToDouble(Console.ReadLine()); Console.Write("Enter The Number of Years : "); year = Convert.ToInt16(Console.ReadLine()); Console.Write("Enter the Rate Of Interest : "); rate = Convert.ToDouble(Console.ReadLine()); interest = princamt * year * rate / 100; total_amt = princamt + interest; Console.WriteLine("Total Amount : {0}", total_amt); Console.ReadLine(); } } }
In this C# program, library function defined in
Simple Interest = princamt * rate * year / 100
Enter the Loan Amount : 1000 Enter the Number of Years : 3 Enter the Rate of Interest : 2 Total Amount : 1060
Sanfoundry Global Education & Learning Series – 1000 C# Programs.
- Get Free Certificate of Merit in C# Programming
- Participate in C# Programming Certification Contest
- Become a Top Ranker in C# Programming
- Take C# Programming Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy Computer Science Books
- Buy C# Books
- Apply for Computer Science Internship
- Practice MCA MCQs
- Buy MCA Books