-2
guru = function (n){
if (n>0){
x = (n%%(1:n) == 0)
cat(x)
}
}
So I need to create a vector that contains all the splitters of n
, but when I test, with some value of n
, it tells me logically if such number in the division gives 0 rest or does not give, I wonder how do I know which numbers and how do I store such numbers in a vector.
Ex: guru (3)
TRUE FALSE TRUE