How can i create function in C , which would generate random number }(type double) between set arguments? In lot of languagues its simply just
function randomnumber(min, max) {
return Math.random() * (max - min + 1) + min;
}
but i fail to find any good solution for type double in c.
floorso you really want a random integer?function...? :) return type? type of arguments?float, yet the post requestdouble. That extra precision/range poses additional concerns that a good answer would provide.maxandmin? It is easier to not include one of the limits so like[min...max)rather than[min... max]. Do you want to be able to generate everydoublebetweenminandmaxor just most of them sufficient?