Using C++, define an integer pointer in main(), and use this pointer to dynamically allocate an integer array with 100 elements; assign the array with random numbers in range [0, 999]. Then pass the array as parameter(s) to a recursive function fun() which counts the number of the integers that are even multiple of three, and prints those integers; after the function call, print the "counter" result; finally, remember to use delete to deallocate the array memories. Please tell me why my code isn't working.
Its basically a function that calls itself over and over again. If you still dont understand it from these videos, try googling around, if you still dont get it, I'll try my best to explain :)
Yes, (p[i] % 3 == 0) is for a number that is divisible by 3, but (p[i] % 3 == 0) && (p[i] % 2 == 0) is for a number that is divisible by 3 and 2, which means a number divisible by 6.