In pseudo code, you're now doing this.
Code:
Start program
Ask user to input an amount of numbers
loop over the given amount each time doing :
1) ask for a number
2) read the number into memory
3) check if number is great than zero and write output to screen
4) wait for user to input something
5) check if number is below zero and write output to screen
6) wait for user to input something
7) check if number is equal to zero and write output to screen
8) wait for user to input something //end of loop
write the value of posi to screen
You should change this so that it looks more like this:
Code:
Start program
initialize variables posi,negi,zero to 0
Ask user to input an amount of numbers
loop over the given amount each time doing :
1) ask for a number
2) read the number into memory
3) check if number is great than zero. If this is true then
write output to screen
save this instance to variable posi .
if this is not true then
4) check if number is below zero. If this is true then
write output to screen
save this instance to a variable negi.
if this is not true then
5) check if number is equal to zero. If this is true then
write output to screen
save this instance to variable zero //end of loop
write the value of posi, negi and zero to screen
end program.
Bookmarks