TOPIC
Wrong error
FelicioNeto asked 3 years ago
using System;
namespace URI { class Program { static void Main(string[] args) { double Salario = double.Parse(Console.ReadLine());
if (Salario <= 2000)
{
Console.WriteLine($"Isento");
}
else
{
double ImpostoRenda = 0;
if (Salario > 2000 && Salario <= 3000)
{
ImpostoRenda = (Salario - 2000.00) * 0.08;
}
else if (Salario > 3000 && Salario <= 4500)
{
ImpostoRenda = (1000 * 0.08) + (Salario - 3000.00) * 0.18;
}
else if (Salario > 4500)
{
ImpostoRenda = (1000 * 0.08) + (1500 * 0.18) + (Salario - 4500.00) * 0.28;
}
Console.WriteLine($"R$ {ImpostoRenda.ToString("N2")}");
}
}
}
}
Porque esta dando wrong error sendo que no console esta tudo certo.
This topic has not been answered yet. Be the first!