max3 <- function(a,b,c) { if ((a>=b)&(a>=c)) { maxabc <- a } else if ((b>=a)&(b>=c)) { maxabc <- b } else { maxabc = c } return(maxabc) }