Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication1;
- import java.util.Scanner;
- /**
- *
- * @author wladi
- */
- public class JavaApplication1 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Scanner sc =new Scanner(System.in);
- int sueldo ;
- int horas;
- int porcentaje=0;
- int bono=0;
- System.out.println("ingrese el sueldo del trabajador");
- sueldo=sc.nextInt();
- System.out.println("ingrese las horas trabajadas");
- horas=sc.nextInt();
- if(horas <=20){
- bono=sueldo*10/100;
- System.out.println("su bono es del 10% : "+bono);
- }else{
- if(horas<=30){
- bono=sueldo*20/100;
- System.out.println("su bono es de 20 %"+bono);
- }else{
- if(horas<=45){
- bono=sueldo*30/100;
- System.out.println("su bono es del 30 %"+bono);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement