# Convert decimal num into binary num via recursive function

convert_to_binary <- function(n) {
    if(n > 1) {
        convert_to_binary(as.integer(n/2))
    }
    cat(n %% 2)
}

print(paste0("52 in binary:"))
convert_to_binary(52)
cat("\n")
