# Recursively checks an array for certain numbers and sums

Recursively checks an array for certain numbers and sums

while the last number is not 0, put new number into an array

Call the recursive methods and show thier output

once end of recusive calls is made, return the number at the index

call method recursively

if the last number is greater than the current number, then return the current number as the smallest

if the last number was smaller, return that instead

once the last index is reached, see if it can be divided by 3, if not do not add it to the sum

call the method recursively

if the number at the current index is divisible by 3, add it to the sum

once the last index is reached, return 0 because the first index is not off

call the method recursively

if the index is odd, add its number to the sum, otherwise skip it

once the last index is reached, see if the number is positive, if it is add 1 to the count total

if the number is positive, add 1 to the count total

while the last number is not 0, put new number into an array

Call the recursive methods and show thier output

once end of recusive calls is made, return the number at the index

call method recursively

if the last number is greater than the current number, then return the current number as the smallest

if the last number was smaller, return that instead

once the last index is reached, see if it can be divided by 3, if not do not add it to the sum

call the method recursively

if the number at the current index is divisible by 3, add it to the sum

once the last index is reached, return 0 because the first index is not off

call the method recursively

if the index is odd, add its number to the sum, otherwise skip it

once the last index is reached, see if the number is positive, if it is add 1 to the count total

if the number is positive, add 1 to the count total

You'll get 1 file (3.5KB)