Swap Two Numbers Without Using Third Variable in C# | CodeWithLakshman

Опубликовано: 13 Май 2026
на канале: CodeWithLakshman
18
2

Learn how to swap two numbers in C# without using a third variable! 🚀
A quick and easy coding trick for beginners — perfect for interview preparation.

💻 Code:
int a = 10, b = 20;
a = a + b;
b = a - b;
a = a - b;
Console.WriteLine($"After Swap: a={a}, b={b}");

#CodeWithLakshman #CSharp #DotNet #CodingShorts #LearnCoding #shortvideo #shorts ,#coding #codewithlakshman