class SwapTwoNumbers
{
public static void Swap()
{
int a, b;
a = 5; b = 10;
b = b - a;
a = a + b;
Console.WriteLine("After swaping value of a : " + a);
Console.WriteLine("After swaping value of b : " + b);
Console.ReadLine();
}
}
{
public static void Swap()
{
int a, b;
a = 5; b = 10;
b = b - a;
a = a + b;
Console.WriteLine("After swaping value of a : " + a);
Console.WriteLine("After swaping value of b : " + b);
Console.ReadLine();
}
}
No comments:
Post a Comment