Table of Contents

Class MH

Namespace
SunamoNumbers
Assembly
SunamoNumbers.dll

Math Helper - provides greatest common factor and lowest common factor calculations.

public class MH
Inheritance
MH
Inherited Members
Extension Methods

Methods

HCF(int, int)

Calculates the Highest Common Factor (Greatest Common Divisor) of two numbers.

public static int HCF(int firstNumber, int secondNumber)

Parameters

firstNumber int

The first number.

secondNumber int

The second number.

Returns

int

The highest common factor of the two numbers, or 0 if either number is 0.

LCF(int, int)

Calculates the Lowest Common Factor (smallest prime factor that divides both numbers).

public static int LCF(int firstNumber, int secondNumber)

Parameters

firstNumber int

The first number.

secondNumber int

The second number.

Returns

int