[ create a new paste ] login | about

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

C++, pasted on Aug 13:
#include <stdio.h>

int main()
{
    for(int x=1;x<=5;++x)
    {
        for(int y=1;y<=5;++y)
        {
            int i=
                          22+y*(12+y*(24+y*( 9+y*16)))
                +x*(      15+y*(18+y*( 1+y*( 6+y*23))))
                +x*x*(    18+y*(23+y*( 9+y*(22+y*16))))
                +x*x*x*(  25+y*( 7+y*( 0+y*(12+y* 4))))
                +x*x*x*x*( 7+y*(28+y*(24+y*( 9+y*28))));

            printf("%2d ",i%29);
        }
        putchar('\n');
    }

    return 0;
}


Output:
1
2
3
4
5
 1  2  3  4  5 
16 17 18 19  6 
15 24 25 20  7 
14 23 22 21  8 
13 12 11 10  9 


Create a new paste based on this one


Comments: