Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MorgageCalc
- {
- class Program
- {
- static void Main(string[] args)
- {
- int loan, i_rate, period;
- double amount_after_t, i_amount;
- Console.WriteLine("Enter the desired amount of the loan: ");
- loan = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter the Interest Rate: ");
- i_rate = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter the Period of the loan (in years): ");
- period = Convert.ToInt32(Console.ReadLine());
- i_amount = loan * i_rate / 100;
- Console.WriteLine("Your yearly Interest sum is: " + i_amount);
- amount_after_t = loan + (period * i_amount);
- Console.WriteLine("The total sum of the loan is: " + amount_after_t);
- Console.WriteLine("The sum per month is: " + (amount_after_t/period)/12);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement