Swap 2 numbers Program in C sharp – using different techniques

Swap 2 numbers Program in C sharp – Learn how to interchange values between 2 variables, with and without using temporary variables ,functions with call be reference and using arithmetic and bitwise XOR operators. Also learn how to code the logic in single line to  interchange values between 2 variables. Swapping means interchanging.For example if you have two … Read more

Factorial program in C# – Simple ways to find factorial of a number

Factorial program in C# with example and logic. l For Example to find the factorial of a number 6 is 720. (6!=6*5*4*3*2*1=720) How to find factorial? The factorial of a number denoted as n!. Factorial Formula. n!=n*(n-1)*(n-2)*…*1 For suppose to find the factorial of a number 6 as based on above formula. 6!=6*(6-1)*(6-2)*(6-3)*(6-4)*(6-5) =6*5*4*3*2*1 =720 … Read more