Skip to content

Instantly share code, notes, and snippets.

View atamrawi's full-sized avatar

Ahmed Tamrawi atamrawi

View GitHub Profile
@atamrawi
atamrawi / Puzzle1.java
Created September 8, 2018 07:30 — forked from benjholla/Puzzle1.java
Java Puzzle 1 (spot the bug if one exists)
import java.util.Random;
public class Puzzle1 {
public static void main(String[] args) {
Random rnd = new Random();
int odds = 0;
int runs = 1000;
for(int i=0; i<runs; i++) {
int num = rnd.nextInt();