Generate random number

A random number is such a number. Which produces a number in a range, with or without a range. Which is not constant but keeps on changing. For example.

Case A : WithIn Range
Range from 1 to 10
[3,8,1,9,6,2,6,7,2,...]
Note that random number may repeat when 
it's decided within the range.

Case B : Without Range
[6,-3. 8, 23323, 5634, 1246, 2133, .....]

Random number can be decimal and floating point or 
negative values. Its depends upon situations.

Write a program which return a random number within the range or without the range. You can use inbuilt function to reduce time complexity. Here mentioning few solutions in different programming language. Which is useful to generating a random number.



Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.

New Comment







© 2021, kalkicode.com, All rights reserved