Advertisement
Erendis42

/ vs >>

Sep 27th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main()
  6. {
  7. int a = Console.Read();
  8. int b = a / 2;
  9. Console.WriteLine(b);
  10. }
  11. }
  12.  
  13. .method private hidebysig static void Main() cil managed
  14. {
  15. .entrypoint
  16. // Code size 19 (0x13)
  17. .maxstack 2
  18. .locals init (int32 V_0,
  19. int32 V_1)
  20. IL_0000: nop
  21. IL_0001: call int32 [mscorlib]System.Console::Read()
  22. IL_0006: stloc.0
  23. IL_0007: ldloc.0
  24. IL_0008: ldc.i4.2
  25. IL_0009: div
  26. IL_000a: stloc.1
  27. IL_000b: ldloc.1
  28. IL_000c: call void [mscorlib]System.Console::WriteLine(int32)
  29. IL_0011: nop
  30. IL_0012: ret
  31. } // end of method Program::Main
  32.  
  33. ----------------------------------------------------
  34.  
  35. using System;
  36.  
  37. class Program
  38. {
  39. static void Main()
  40. {
  41. int a = Console.Read();
  42. int b = a >> 1;
  43. Console.WriteLine(b);
  44. }
  45. }
  46.  
  47. .method private hidebysig static void Main() cil managed
  48. {
  49. .entrypoint
  50. // Code size 19 (0x13)
  51. .maxstack 2
  52. .locals init (int32 V_0,
  53. int32 V_1)
  54. IL_0000: nop
  55. IL_0001: call int32 [mscorlib]System.Console::Read()
  56. IL_0006: stloc.0
  57. IL_0007: ldloc.0
  58. IL_0008: ldc.i4.1
  59. IL_0009: shr
  60. IL_000a: stloc.1
  61. IL_000b: ldloc.1
  62. IL_000c: call void [mscorlib]System.Console::WriteLine(int32)
  63. IL_0011: nop
  64. IL_0012: ret
  65. } // end of method Program::Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement