Вы находитесь на странице: 1из 3

INGRESAR LOS DATOS DE UN EMPLEADO DONDE SE VA A CALCULAR EL SUELDO QUE GENERE

LA INSTITUCION POR UN MENSAJE DE TEXTO SE VA A INGRESAR LOS CAMPOS


NOMBRES,APELLIDOS,DIRRECION ,EDAD ,LUGAR DONDE TRABAJA,SUELDO.

import java.util.Scanner;

public class SUELDO {

public static void main(String[] args) {


// TODO Auto-generated method stub
Scanner leer = new Scanner (System.in);

String nombres,apellido, lugar ;


int edad,horas,prestamos;
float valorf, sueldof;
int cantidad,seguro;
int sueldo;
int VALORHEXTRAS = 33;

System.out.println ("\n
-------------------------------------" );
System.out.println ("\n\n\t DATOS DEL EMPLEADO" );
System.out.println ("\n\n -------------------------------------"
);

System.out.println ("\ningrese el nombre del empleado");


nombres = leer.next();

System.out.println ("\ningrese el apellido del empleado");


apellido = leer.next();

System.out.println ("\ningrese la edad del empleado");


edad = leer.nextInt();
System.out.println ("\ningrese el lugar de trabajo
empleado");
lugar = leer.next();

System.out.println ("\ncuantas horas extras laboro durante


el mes");
horas = leer.nextInt();

System.out.println ("\ningrese la cantidad ganancia del


empleado");
cantidad = leer.nextInt();

System.out.println ("\ningrese el descuento del seguro del


empleado");
seguro = leer.nextInt();

System.out.println ("\nDesea hacer un prestamo");


System.out.println ("\nSI es asi cuanto desea caso
contrario ponga 0 :");
prestamos = leer.nextInt();

sueldo = VALORHEXTRAS*horas;

valorf= sueldo- seguro;

sueldof= valorf- prestamos;

System.out.println ("\n
-------------------------------------" );
System.out.println ("\n\n\t\t ROL DE PAGO" );
System.out.println ("\n\n\n
-------------------------------------" );

System.out.println ("\nNombre :"+ nombres );


System.out.println ("\nApellidos :"+ apellido );
System.out.println ("\nEdad :"+ edad );
System.out.println ("\nLugar de trabajo :"+ lugar );
System.out.println ("\nEl descuento del seguro es de : $"+
seguro );
System.out.println ("\nUsted hizo un prestamo de : $ "+
prestamos );
System.out.println ("\nSueldo del mes trabajado : $" +
cantidad );
System.out.println ("\nLas ganacias de la ora extra es : $
"+ sueldo );
System.out.println ("\nSu sueldo final es de : $ "+
sueldof );

{
if (sueldof<= -1)

System.out.println ("\n Usted debe :"+ sueldof );

if (sueldof>= -1)
System.out.println ("\n GRACIAS :");

}
}
}

Вам также может понравиться