by RedSting71 (9 Submissions)
Category: Math/Dates
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.
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
No comments have been posted about Finds the Greatest Common Factor of two numbers using the Euclidean algorithim.. Why not be the first to post a comment about Finds the Greatest Common Factor of two numbers using the Euclidean algorithim..