Mathd fn

Run Settings
LanguageJava
Language Version
Run Command
public class Main { public static void main(String[] args) { int a = (int) Math.round(2.3); System.out.println(a); int b = (int) Math.ceil(7.6); System.out.println(b); int c = (int) Math.floor(3.5); System.out.println(c); int d = Math.max( 7, 5); System.out.println(d); int e = Math.min(6,4); System.out.println(e); float f = (float) Math.random(); // random no between 0 & 1 System.out.println(f); double v = Math.random() * 10; // random no between 0 & 10 System.out.println(v); } }
Editor Settings
Theme
Key bindings
Full width
Lines