Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // my mod with bitwise
- #include <stdio.h>
- int
- mod6(int x)
- {
- while (x > 6)
- x = (x&6) + (x>>3);
- return (!(x^6))?0:x;
- }
- int
- main()
- {
- int a=256,n=6;
- printf("%d %d %d %d\n", a-(n*(a/n)),a%n, ~(a-(5+((a>>(n>>1))<<(n>>1)))), mod6(a) );
- }
Advertisement
Add Comment
Please, Sign In to add comment