I created a program which takes a number between 0-100 to calculate probability and i created a module but when i call for it it brings me numbers out of my requested range, please tell me what i am doing wrong,
I have
i=0
h=100
This is my module
Thanks in advanceCode:double probability (int h, int i) { return ((double) rand () / RAND_MAX) * (h-i) + i; }




Reply With Quote