Created
October 21, 2022 04:16
-
-
Save HugoRoca/3aecd2b176cd22af5d4993ba0439a644 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (anios <= 0) Console.WriteLine("Los datos son incorrectos."); | |
else | |
{ | |
if (anios <= 2) | |
{ | |
if (rol == "A") | |
{ | |
salary = 2000; | |
} | |
else if (rol == "C") | |
{ | |
salary = 1500; | |
} | |
else if (rol == "S") | |
{ | |
salary = 1000; | |
} | |
} | |
else if (anios >= 3 && anios <= 5) | |
{ | |
if (rol == "A") | |
{ | |
salary = 2500; | |
} | |
else if (rol == "C") | |
{ | |
salary = 2000; | |
} | |
else if (rol == "S") | |
{ | |
salary = 1500; | |
} | |
} | |
else if (anios >= 6 && anios <= 8) | |
{ | |
if (rol == "A") | |
{ | |
salary = 3000; | |
} | |
else if (rol == "C") | |
{ | |
salary = 2500; | |
} | |
else if (rol == "S") | |
{ | |
salary = 2000; | |
} | |
} | |
else | |
{ | |
if (rol == "A") | |
{ | |
salary = 4000; | |
} | |
else if (rol == "C") | |
{ | |
salary = 3500; | |
} | |
else if (rol == "S") | |
{ | |
salary = 2500; | |
} | |
} | |
Console.WriteLine("Tu sueldo es de: S/ {0}", salary); | |
} | |
Console.ReadKey() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment