fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int horas,pg1,pg2,totalhoras,totalpago;
  13. horas=60;
  14. pg1=16;
  15. pg2=20;
  16. System.out.println("horas de trabajo "+horas);
  17. if(horas<=40);{
  18. totalpago=horas*pg1;
  19. System.out.println("total de pago"+totalpago);}
  20. {
  21. totalhoras=horas-40;
  22. totalpago=(40*16)+(totalhoras*20);
  23. System.out.println("total de pago"+totalpago);}
  24. }
  25.  
  26. // your code goes here
  27.  
  28. }
Success #stdin #stdout 0.09s 27764KB
stdin
Standard input is empty
stdout
horas de trabajo 60
total de pago960
total de pago1040