I am writing a recursive function to print all the divisor's of a number including 1 and itself.
I am using a functionand inside that I am usingCode:print_recur(int number)how can i get it to print out iff a number is divisible and just skip the ones that arent.Code:number % (number - 1)
It will end up printing for 10: 10, 5, 2, 1