Advertisement
VEGASo

(C#) Lab #3 Ex. 2 (Вариант 7)

Oct 15th, 2022
736
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace LearnRSUE
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             int time;
  10.             double vklad;
  11.  
  12.             Console.Write("Сумма вклада: ");
  13.             vklad = Convert.ToInt32(Console.ReadLine());
  14.  
  15.             Console.Write("Срок вклада(месяцев): ");
  16.             time = Convert.ToInt32(Console.ReadLine());
  17.  
  18.  
  19.             for (int i = 0; i < time; i++)
  20.             {
  21.                 vklad += vklad * 0.06;
  22.             }
  23.  
  24.             Console.WriteLine("\nЧерез " + time + " месяцa вы получите " + Math.Round(vklad, 2) + " руб");
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement