-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
29 lines (24 loc) · 912 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Exercicio_CalculaPoupanca2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Executando o Projeto - Laço de Repetição FOR: \r\n");
double valorInvestido = 1000;
for (int contadorMes = 1; contadorMes <= 12; contadorMes++)
{
//O valor da variável será multiplicado por 1.0036 e será guardado novamente em valorInvestido.
valorInvestido *= 1.0036;
//A forma acima é uma versão resumida de: valorInvestido = valorInvestido + valorInvestido * 0.0036;
Console.WriteLine("Após " + contadorMes + " meses, você terá R$ " + valorInvestido + ".");
}
Console.ReadLine();
}
}
}