bool allPositive(int A[], int n) { for(int i = 0; i < n; i++) { if(A[i] <= 0) { return false; } } return true; }