Advertisement
IvetValcheva

03. Deposit Calculator

Oct 31st, 2021
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2.  
  3. namespace DepositCalculator
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //сума = депозирана+срок*((депозирана*год.лихвен пр.)/12)
  10.  
  11.             double depositSum = double.Parse(Console.ReadLine());
  12.             int months = int.Parse(Console.ReadLine());
  13.             double percent = double.Parse(Console.ReadLine());
  14.  
  15.             double sum = depositSum + months * ((depositSum * (percent / 100)) / 12);
  16.  
  17.             Console.WriteLine(sum);
  18.         }
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement