tsvetelinapasheva

TsvetelinaPasheva/FirstStepInCodingExercise/03.DepositeCalculator

Jan 10th, 2021 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _03.DepositCalculator
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double deposit = double.Parse(Console.ReadLine());
  10.             int monthlyDeposit = int.Parse(Console.ReadLine());
  11.             double yearlyInterest = double.Parse(Console.ReadLine());
  12.             double accuredInterest = deposit * yearlyInterest/100;
  13.             double interestPerMonth = accuredInterest / 12;
  14.             double total = deposit + (3 * (monthlyDeposit * interestPerMonth));
  15.             double sum = deposit + monthlyDeposit * (deposit * (yearlyInterest/100))/12;
  16.             Console.WriteLine(sum);
  17.  
  18.         }
  19.     }
  20. }
Add Comment
Please, Sign In to add comment