Computer Science, asked by khannaankit8717, 1 year ago

Write a csharp program to input principal amount time rate and calculate simple interest

Answers

Answered by oraclenaren200palkoj
2
using System;
namespace Interest
{
class Program
{
staticvoidMain(string[]args) {
int year;
double princamt,rate, interest, total_amt; Console.Write("EnterTheAmount : "); 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(); } }}
Similar questions