Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _7.Interest
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal deposit = decimal.Parse(Console.ReadLine());
- decimal firstYearDeposit = deposit + deposit * 0.05m;
- decimal secondYearDeposit = firstYearDeposit + firstYearDeposit * 0.05m;
- decimal thirdYearDeposit = secondYearDeposit + secondYearDeposit * 0.05m;
- Console.WriteLine($"{firstYearDeposit:f2}\n{secondYearDeposit:f2}\n{thirdYearDeposit:f2}\n");
- }
- }
- }
Add Comment
Please, Sign In to add comment