here's some pseudo-code that you can easily implement in the language of your choice:
function allplus(int[] a) {
for each i in a
if (a[i] <= 0) return false
next
return true
}
I need help with this question please!
Please write me step by step instructions or how should I begin the problem.
Thank you for your time ;)
Write a function that takes an array and returns true if all the elements in the array are positive, otherwise, it returns false.
1 answer