Computer Science

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. 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
}

posted by Steve

Similar Questions

1. math

Use fraction bars to find the difference for question 1/3 - 1/2 I need a visual step by step instructions
2. Algebra 1

How do you write the equation of a line if you have two points? Please use detail and give step by step instructions: trying to study for a test and I don't understand this concept.
3. ALGEBRA HELP

When solving the equation, what property was used to go from step 3 to step 4? Step 1: -(2x+3= x-18 Step 2: -2x-3=x-18 Step 3: -3=3x-18 Step 4: 15=3x A)APOE B)SPOE C)MPOE D)DPOE
4. Chemistry

I am working on a five-part question and I just need help with the last part. I'm not sure where to begin with that one. I pasted the question and answers (for a-d) to the other parts below. Thank you! Consider the proposed
5. Math

I am currently doing a question in which the equation is dN1/dt= -N1 + 0.1N1*N2 However, I am able to follow until the step of -N1(1 - 0.1N2) after that I'm not able to follow to the step of (-1)N1 (1-N2/10) Can someone please
6. Algebra

Debbie finished her algebra test early so she decided to check each of her answers. After checking her answer to question #10, she realized she made a mistake in her solution. In which step does Debbie make her mistake? Original
7. algebra

please give me step by step instructions on how to solve the following equations; x-y=3 and -x+4y=9 I am trying to graph the coordinates.
8. Math

In which step is the error? Step 1: Let x = 1 and y = 1. Step 2: By substitution xy = y^2. Step 3: Multiplying both sides by -1, -xy= -y^2. Step 4: Adding x^2 to both sides, x^2-xy=x^2-y^2. Step 5: Factoring, x(x-y)=(x+y)(x-y).
9. algebra

i need help step by step instructions for 2 problems i got the rest but these 2 are harder -7q+2=11q-8q 8(j-3)=4j+9j-14
10. Algebra help

f(x)=x^3-4x^2-x+4 How do I find the x-intercept for this? This is from my book: step 1: 0=x^3-4x^2-x+4 step 2: 0=x^2(x-4)+(-1)(x-4) step 3: 0=(x^2-1)(x-4) I know how to solve once I get to step 3, but in step 2, I don't know what

More Similar Questions