Home for the Programmer, Webmaster and Bloggers

13 December 2018

USING C SHARP TO CALCULATE SIMPLE INTEREST

Image result for c# image
You can write a simple code to perform SI(Simple Interest), you can use C#
to solve mathematical problems, just like some of the articles. The formular of
simple interest is below and the solution.

        I = PRT/100

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

namespace Even
{
    class Program
    {
        static void Main(string[] args)
        {
                   COnsole.WriteLine("Enter Principal P:");

double P = COnsole.ReadLine();

COnsole.WriteLine("Enter Rate R:");

double R = int.Parse(COnsole.ReadLine());

COnsole.WriteLine("Enter Time T:");
double T = int.Parse(Console.ReadLine());
double I = (P*R*T)/100;
Console.WriteLine("Interest ="+I);

                         Console.ReadKey();


        }

No comments:

Post a Comment