NedyalkoKikov

ExchangeVarableValues

Nov 5th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using System;
  2.  
  3. class ExchangeVarableValues
  4. {
  5. static void Main(string[] args)
  6. {
  7. int A = 5;
  8. int B = 10;
  9. int C;
  10. Console.WriteLine("Before: \n A = {0}; \n B = {1}:",A,B);
  11. Console.WriteLine("After:\n A = {0};\n B = {1};",B,A);
  12. C = A;
  13. A = B;
  14. B = C;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment