fork(2) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int xy = -123456;
  8. ushort m_X = (ushort) xy;
  9. ushort m_Y = (ushort)(xy>>16);
  10. Console.WriteLine("{0} {1}", m_X, m_Y);
  11. int back = (m_Y << 16) | m_X;
  12. Console.WriteLine("{0} {1}", xy, back);
  13. }
  14. }
Success #stdin #stdout 0.03s 37016KB
stdin
Standard input is empty
stdout
7616 65534
-123456 -123456