This paper presents a new method for numerical simulation of D-distributions and the corresponding algorithm, for numerical generating of random variables, one having gamma distribution and the second having an exponential type distribution. Also, we present some methods for generating of random variable having gamma distribution in two different cases, when the parameter is between 0 and 1 (0<λ<1). The numerical results and the histogram of generating dates are also presented.