Advertisement
koksibg

Exchange_Variable_Values

Sep 27th, 2016
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Exchange_Variable_Values
  8. {
  9.     class Exchange_Variable_Values
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int a = 5;
  14.             int b = 10;
  15.             int c = a;
  16.             Console.WriteLine("Before:");
  17.             Console.WriteLine("a = " + a);
  18.             Console.WriteLine("b = " + b);
  19.             a = b;
  20.             b = c;
  21.             Console.WriteLine("After:");
  22.             Console.WriteLine("a = " + a);
  23.             Console.WriteLine("b = " + b);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement