Skip to content

Instantly share code, notes, and snippets.

@johnSerrano
Created October 12, 2015 06:50
Show Gist options
  • Save johnSerrano/fb0e1fe55412489c9c45 to your computer and use it in GitHub Desktop.
Save johnSerrano/fb0e1fe55412489c9c45 to your computer and use it in GitHub Desktop.
import java.util.Random;
public class Temp{
public static void main(String[] args)
{
Random random = new Random();
//sum of two random integers
int q = random.nextInt(6)+1;
int c1 = random.nextInt(6)+1;
int sum = q + c1;
System.out.println(q + " + " + c1 + " = " + sum);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment