A EMPRESA XY LTDA PIDIO AL DEPARTAMENTO DE SISTEMAS UN PROGRAMA EN C++ QUE CALCULE LA NOMINA DE LOS EMPLEADOS CON LAS SIGUIENTES CONDICIONES:DEVENGADO= SUELDO BASICO= $15000 * NUMERO DE DIAS TRABAJADOS SUBSIDIO DE TRANSPORTE= $51000 HORAS EXTRAS NOCTURNAS= 12% POR VALOR DE UNA HORA + VALOR DE LA HORAHORAS EXTRAS DIURNAS DOMINICALES= %25% POR VALOR DE UNA HORA + VALOR DE UNA HORADEDUCCIONES=SALUD= 7% DEL SALARIO BASICOPENSION= 7% DEL SALARIO BASICOPRESTAMOS= 10% DEL SALARIO BASICOLOS RESULTADOS QUE SE MUESTRAN EN PANTALLA SON:- NOMBRE DEL EMPLEADO
- TOTAL DEVENGADO
- TOTAL DEDUCIDO
- SALARIO NETO A PAGAR
- VALOR PRESTAMO ADQUIRIDO (SI TIENE PRESTAMOS ACTIVOS)
- SALDO POR PAGAR DEL PRESTAMO (SI TIENE PRESTAMOS ACTIVOS)
#include "conio.h"
#include "stdio.h"
#include "math.h"
#include "cstdlib"
main(void)
{
int a,b,sb,hen,hedd,saludpen,p,prest,prestt,dt,he,dev,ded,sn,hedd1,hen1;
char nom[20];
printf("\n\tDIGITE 1 PARA REALIZAR CALCULOS DE NOMINA ");
printf("\n\tDIGITE 2 PARA SALIR ");
scanf("%d",&a);
while(a==1)
{
system("cls");
printf("\n\tINGRESE NOMBRE EMPLEADO ");
scanf("%s",nom);
printf("\n\tDIGITE NUMERO DE DIAS TRABAJADOS ");
scanf("%d",&dt);
printf("\n\tDIGITE CANTIDAD DE HORAS EXTRAS DIURNAS DOMINICALES TRABAJADAS ");
scanf("%d",&hedd);
printf("\n\tDIGITE CANTIDAD DE HORAS EXTRAS NOCTURNAS TRABAJADAS ");
scanf("%d",&hen);
sb=15000*dt;
hedd1=(((15000/8)*25/100)+(15000/8))*hedd;
hen1=(((15000/8)*12/100)+(15000/8))*hen;
saludpen=(7*sb/100)*2;
printf("\n\tPRESIONE 1 SI HA ADQUIRIDO PRESTAMOS ");
printf("\n\tPRESIONE 2 SI NO HA ADQUIRIDO PRESTAMOS
");
scanf("%d",&b);
if(b==1)
{
printf("\n\tDIGITE VALOR DEL PRESTAMO ADQUIRIDO ");
scanf("%d",&p);
prest=sb*10/100;
prestt=p-prest;
}
if(b==2)
{
prest=0;
}
dev=sb+hedd+hedd1+hen1;
ded=saludpen+prest;
sn=dev-ded+51000;
printf("\n\tEMPLEADO: %s",nom);
printf("\n\tTOTAL DEVENGADO= $ %d",dev);
printf("\n\tTOTAL DEDUCIDO= $ %d",ded);
printf("\n\tSALARIO NETO A PAGAR= $ %d ",sn);
if(b==1)
{
printf("\n\tVALOR PRESTAMO ADQUIRIDO= $ %d",p);
printf("\n\tSALDO POR PAGAR POR CONCEPTO DE PRESTAMO= $ %d ",prestt);
}
system("pause");
}
if(a==2)
EXIT_SUCCESS;
}