ASSIGNMENT by Fasih Dawood Roll # 1612118: Code of Swapping

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 2

ASSIGNMENT By Fasih Dawood

Roll # 1612118

CODE OF SWAPPING:
using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace ConsoleApplication3

class Program

static void Main(string[] args)

int a = 12, b = 4;

Console.WriteLine("\nValues Before Swap a= {0} ,b = {1} ", a,b );

a = a ^ b;

b = a ^ b;

a = a ^ b;

Console.WriteLine("\nValues After Swap a= {0} ,b = {1} ", a, b);

Console.ReadLine();

}
}

You might also like