[ create a new paste ] login | about

Link: http://codepad.org/hPEZQkUT    [ raw code | output | fork ]

C++, pasted on Mar 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
unsigned foo( unsigned x )
{
    unsigned t;
    for ( int i = 0; i < 30; ++i )
    {
        t = ( x & 1 ) << 31;
        x >>= 1;
        x |= t;
    }
    return x;
} 

int main()
{
    cout << foo( 23 );
}


Output:
1
92


Create a new paste based on this one


Comments: