Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 16, 2021 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/47801e0a8ea78636aab322f9dc00e34f to your computer and use it in GitHub Desktop.
Save parzibyte/47801e0a8ea78636aab322f9dc00e34f to your computer and use it in GitHub Desktop.
// Realizar cálculos
double salarioBruto = pagoPorHora * horasTrabajadas;
// Calcular descuentos
double descuentoSeguroSocial = (porcentajeDescuentoSeguroSocial * salarioBruto) / 100;
double descuentoSeguroEducativo = (porcentajeDescuentoSeguroEducativo * salarioBruto) / 100;
double descuentoImpuestoRenta = (porcentajeDescuentoImpuestoRenta * salarioBruto) / 100;
// Total de deducciones
double totalDeducciones = descuentoSeguroSocial + descuentoSeguroEducativo + descuentoImpuestoRenta;
// Restamos al salario bruto
double sueldoNeto = salarioBruto - totalDeducciones;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment