Vignette Info

This vignette gives the greatest common divison as an output between two given numbers( e.g. The greatest common divisor of 3800 and 190 is 190, which has been shown as an output).

eud <- function(x1,x2){
  tony <- function(x){
    k=vector()
    for(i in 1:(x)){
      if(x %% i ==0){
        k=cbind(k,c(i))
      }
    }
    return(k)
  }
  a = as.vector(tony(abs(x1)))
  b = as.vector(tony(abs(x2)))

  ca = a %in% b
  caa= max(which(ca == TRUE))
  return(a[caa])
}
eud(3800,190)


nitinsverige/zrbc2feb19 documentation built on May 16, 2019, 9:30 a.m.