Script Viewer
C#
Example 4
Download
Save Modified
/* C# - Swap Example - Without third variable */ using System; public class SwapExample { public static void Main() { int a=5, b=10; Console.WriteLine("Before swap a= "+a+" b= "+b); a=a*b; b=a/b; a=a/b; Console.Write("After swap a= "+a+" b= "+b); } }