fork 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 notaMate
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. double rangoA, rangoB;
  13. Random rnd = new Random();
  14. rangoA = Math.round((rnd.nextDouble()*10)*10d)/10d;
  15. rangoB = Math.round((rnd.nextDouble()*10)*10d)/10d;
  16. if(rangoA<rangoB){
  17. System.out.println("Tu nota esta comprendida entre los valores " + rangoA + " y " + rangoB);
  18. }
  19. else{
  20. System.out.println("Tu nota esta comprendida entre los valores " + rangoB + " y " + rangoA);
  21. }
  22.  
  23. }
  24. }
Success #stdin #stdout 0.06s 4386816KB
stdin
Standard input is empty
stdout
Tu nota esta comprendida entre los valores 4.5 y 9.1