• + 1 comment

    just type,
    for i=0 to n-1
    print a [ ( i + d ) %n ].

    thats all..