Swap Two Numbers Without using Temporary Variable in C#
namespace Swap
{
Class Test
{
public static void Main(string[] args)
{
int a,b;
a=1;
b=2;
a=a+b;
b=a-b;
a=a-b;
Console.Writeline(a.Tostring());
Console.Writeline(b.Tostring());
Console.ReadLine();
}
}
}
Comments
Post a Comment