
Christopher Y. answered 05/29/21
UPenn Engineer Specializing in Computer Science Tutoring
Hi James! What have you tried so far, and where is your confusion? To start, I would first think about what values you'd need to track and then create variables for them. As a next first step for your program, you should think about how you would classify a single number x as either a positive number or zero. You might find a comparator operator (such as >, <, ==, etc depending on the language) useful here.
From there, try using your favorite type of loop and see if you can put the parts together. I'd encourage you to try it out on your own for a little and you can always follow-up with more questions