Advertisement
Patresss

Untitled

Jun 19th, 2014
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int corobi(int num, int bity);
  3. int main (){
  4. int zm, zm1;
  5. zm = 5;
  6. int b=4;
  7. ("%d %d \n", zm, corobi(zm,4));
  8.  
  9. }
  10. int corobi(int num, int bity){
  11. int maska=0;
  12. int wart = 1;
  13.  
  14. while (bity --> 0)
  15. {
  16. printf(" %d ", bity);
  17. maska |=wart;
  18. printf("##%d##",maska);
  19. wart <<=1;
  20. printf("!!%d!!",wart);
  21. }
  22. return num^maska;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement