Display numbers from 1 to 100 without loops or conditions
        Posted  
        
            by Harsha
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Harsha
        
        
        
        Published on 2010-01-11T18:42:00Z
        Indexed on 
            2010/05/15
            17:44 UTC
        
        
        Read the original article
        Hit count: 326
        
Is there a way to print numbers from 1 to 100 without using any loops or conditions like "if"?
We can easily do using recursion but that again has an if condition. Is there a way to do without using "if" as well?  Also no repetitive print statements,or a single print statement containing all the numbers from 1 to 100.
A solution in Java is preferable.
© Stack Overflow or respective owner