generate random number by c/c++