-int rand = Math.random()*10
+class Rand {
+ static void main (String[] args) {
+ println("Groovy model-checking")
+ Random random = new Random(42);
+
+ int a = random.nextInt(10)
+ int b = random.nextInt(10)
+ println("a=" + a)
+ println(" b=" + b)
-if (rand < 5) {
- //println "rand is less than 5: "
- System.out.println(rand)
-} else {
- //println "rand is greater than or equal to 5: "
- System.out.println(rand)
+ int c = a/(b+a -5)
+ println(" c=" + c)
+ }
}