Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package javaapplication1;
  7.  
  8. import java.util.Scanner;
  9.  
  10. /**
  11. *
  12. * @author wladi
  13. */
  14. public class JavaApplication1 {
  15.  
  16. /**
  17. * @param args the command line arguments
  18. */
  19. public static void main(String[] args) {
  20. Scanner sc =new Scanner(System.in);
  21. int sueldo ;
  22. int horas;
  23. int porcentaje=0;
  24. int bono=0;
  25. System.out.println("ingrese el sueldo del trabajador");
  26. sueldo=sc.nextInt();
  27. System.out.println("ingrese las horas trabajadas");
  28. horas=sc.nextInt();
  29.  
  30.  
  31. if(horas <=20){
  32. bono=sueldo*10/100;
  33. System.out.println("su bono es del 10% : "+bono);
  34.  
  35. }else{
  36. if(horas<=30){
  37. bono=sueldo*20/100;
  38.  
  39. System.out.println("su bono es de 20 %"+bono);
  40. }else{
  41. if(horas<=45){
  42. bono=sueldo*30/100;
  43. System.out.println("su bono es del 30 %"+bono);
  44. }
  45. }
  46. }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement