Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MathStuff
- {
- public static void main(String[]args)
- {
- //square root
- double a = Math.sqrt(25);
- System.out.println(a);
- //absolute value
- int b = Math.abs(2);
- System.out.println(b);
- double c = Math.abs(-2.5);
- System.out.println(c);
- double d = Math.pow(4,-2);
- System.out.println(d);
- long e = Math.round(2.44165641561);
- System.out.println(e);
- int f = Math.max(5,6);
- System.out.println(f);
- int g = Math.min(5,6);
- System.out.println(g);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement