/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sumulationsecondlab.New;

import java.util.Random;

public class ExponentialRandom {

    public static void main(String[] a) {

        Random r = new Random();
        double u, x,v=2.6;

        System.out.println("The exponential random variate are:");
        for (int i = 1; i <= 10; i++) {
            u = r.nextFloat();
            x=-(1/v)*Math.log(u);
            System.out.println("X["+i+"]="+x+", ");
        }
    }
}