Skip to content

Instantly share code, notes, and snippets.

@PocasPedro
Created November 13, 2017 16:11
Show Gist options
  • Save PocasPedro/66c3a830f3a3fdb9eebe416f2ad9c14c to your computer and use it in GitHub Desktop.
Save PocasPedro/66c3a830f3a3fdb9eebe416f2ad9c14c to your computer and use it in GitHub Desktop.
Java Fundamentals for Kids - Exercise 27
import java.lang.Math;
/*
Program that shows in terminal a random number between 1 and 1000
*/
public class RandomNumber {
public static void main(String[] args) {
int randomnumber = (int)(Math.random()*1000);
System.out.println("Our random number is: " + randomnumber);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment