Cyclical conversion code



  • Complicated with C-Cypical conversion code. Full condition:

    To write a program that will allow the introduction of two n and k of type unsigned from the keyboard, print them on the display, and use the battle operations to make it one of the n cycles to the right.

    There is no problem with the first part. Thank you. :



  • unsigned m;
    ......
    // k = k % (sizeof(n)*8);
    m = n << (sizeof(n)*8 - k);
    n = n >> k;
    n = n | m;
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2