Advertisement
M0Hk

Deposit Calculator

Sep 17th, 2023
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | Software | 0 0
  1. using System;
  2.  
  3. namespace firstLesson
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double amount = double.Parse(Console.ReadLine());
  10.             int months = int.Parse(Console.ReadLine());
  11.             double interest = double.Parse(Console.ReadLine());
  12.  
  13.             double finalAmount = amount + months * (amount * (interest / 100)) / 12;
  14.             Console.WriteLine(finalAmount);
  15.                    
  16.          
  17.  
  18.  
  19.  
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement