Monthly Archives: September 2015

Keyword ref and code examples in C#

Keyword ref in C# forces an argument to be passed to the method to be passed by reference. It means that argument must be initialized before it is passed to the method. It also means that any change in the

Posted in c-sharp-code-examples

Least common multiple calculator

Enter integer numbers and calculate least common multiple. N:   M:  LCM:  Calculate Read how least common multiple can be calculated in C#

Posted in calculators

Least common multiple in C#

Calculate least common multiple Least common multiple is the smallest positive integer that is divisible by both a and b. Now, if we know greatest common divisor of two positive, greater then zero integers a and b, we can calculate

Posted in c-sharp-code-examples

Greatest common divisor calculator

Enter integer numbers and calculate greatest common divisor. N:   M:  GCD:  Calculate Read how greatest common divisor can be calculated in C#

Posted in calculators Tagged with: ,

Greatest common divisor code in C#

Greatest common divisor of two positive integer numbers N and M, both larger then zero is the largest integer R that divide both N and M. If for given N and M, greatest common divisor is 1, we say that

Posted in c-sharp-code-examples Tagged with: ,