Java tutorial
//package com.java2s; public class Main { /** * Calculate experience based on minimum experience provided by enemy... * @param baseExperience * */ public static int getGold(int baseGold) { float random = (float) Math.random(); return (int) (baseGold + (baseGold * random)); } }