Advertisement
andrewb

shift.cpp

May 13th, 2014
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.17 KB | None | 0 0
  1. #include <iostream>;
  2.  
  3. void shift(int* x, int z)
  4. {
  5.     *x = *x << z;
  6.     std::cout << *x << std::endl;
  7. }
  8.  
  9. void main()
  10. {
  11.     int x = 1;
  12.     for(int y=0;y<8;y++) { shift(&x, 1); }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement