Spocoman

03. Deposit Calculator

Nov 14th, 2021 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2.  
  3. namespace DepositCalculator
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             double sum = double.Parse(Console.ReadLine());
  10.             int months = int.Parse(Console.ReadLine());
  11.             double annualPercentage = double.Parse(Console.ReadLine());
  12.  
  13.             double total = sum + (months * sum * annualPercentage / 1200);
  14.  
  15.             Console.WriteLine(total);
  16.         }
  17.     }
  18. }
Add Comment
Please, Sign In to add comment