esha492

u3a3

May 18th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. A
  2. 0.D
  3. 0.A
  4.  
  5. 0.D
  6.  
  7. 0.5
  8. 0.2.0
  9. 0.3.141592653589793
  10. 0.6
  11. 0.4
  12. 0.8
  13. 0.8
  14.  
  15. 0.System.out.print(“Welcome”); System.out.print(“to”); System.out.print(“Java”); System.out.print(“Illuminated”);
  16. 0.int i = Math.max(3,5);         System.out.println(i);
  17. 0.double d = 5.0; double d2 = Math.squrt(5,0), System.out.printlin(d2);
  18. 0.Scanner console = new Scanner(System.in);         int i = console.nextInt();         int o = console.nextInt();         System.out.println(Math.max(i,o));
  19. 0.Scanner console = new Scanner(System.in);         int i = console.nextInt();         int o = console.nextInt();  int p = console.nextInt();         System.out.println(Math.max(i,o,p));
  20.  
  21. 0.Scanner console = new Scanner(System.in);         double i = console.nextDouble();         System.out.println(Math.pow(i,2));
  22.  
  23. 0.cant use decimal, cause it is a double not a short
  24. 0.pow uses a double not an int
  25. 0.PI is not a double
  26.  
  27. 0.Math has to be capitalized when being used to call a math class function
  28. 0.PI cannot be followed by brackets
  29. 0.Math.e does not exist, replace with any math function that does
  30.  
  31. 0.
  32. Random r = new Random();
  33. int Low = 0;
  34. int High = 100;
  35. int Result = r.nextInt(High-Low) + Low;
  36. Random r2 = new Random();
  37. int low2 = 0;
  38. int high2 = 100;
  39. int result2 = r2.nextInt(high2-low2)+low2;
  40. System.out.println(Math.max(Result,result2));
  41.  
  42. 0.   
  43. Scanner console = new Scanner(System.in);         
  44. double a = console.nextDouble();         
  45. System.out.println(Math.pow(a,3));
Advertisement
Add Comment
Please, Sign In to add comment