Interesting task using random numbers only
        Posted  
        
            by psihodelia
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by psihodelia
        
        
        
        Published on 2010-05-26T10:20:56Z
        Indexed on 
            2010/05/26
            10:31 UTC
        
        
        Read the original article
        Hit count: 284
        
Given any number of the random real numbers from the interval [0,1] is there exist any method to construct a floating point number with zero decimal part?
Your algorithm can use only random() function calls and no variables or constants. No constants and variables are allowed, no type casting is allowed. You can use for/while, if/else or any other programming language operands.
© Stack Overflow or respective owner