- Home
·
- Math/Dates
·
- Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.
Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.
Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.
Rate Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.
(1(1 Vote))
Public Function GCF(number1 as integer, number2 as integer)
If Val(number1) = Val(number2) Then GCF = number1: Exit Function
20
r = number1 Mod number2
If r = 0 Then GoTo 50
40: number1 = number2: number2 = r: GoTo 20
50: GCF = number2
End Function
Finds the Greatest Common Factor of two numbers using the Euclidean algorithim. Comments
No comments yet — be the first to post one!
Post a Comment