#'Euclidean Function
#'@export
#'
#'@name Euclidean
#'
#'@description This algorithm efficiently computes the greatest common divisor.
#'
#'@param a is an integer
#'@param b is an integer
#'
#'@return It returns the greatest common divisor of two integers \code{a} and \code{b}
#'
#'@references "https://en.wikipedia.org/wiki/Euclidean_algorithm"
#'
#' @examples
#' euclidean(100,200)
#' euclidean(123612,13892347912)
#'
##
euclidean <- function(a,b){
while(b != 0){
t <- b
b <- a %% b
a <- t
}
return(a)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.