yllee
asked on
Pseudocode
Please help me correct all logical errors in the pseudocode below. It is one of my course work.
-------------------------- ---------- ---------- ---------- ----
The pseudocode attempts to count the number of positive & negative numbers within 10 locations that are already stored into an array & at the end of process display POS_COUNT and NEG_COUNT.
Set POSITION to 1
DO while POSITION <= 10
Increase POSITION by 1
if ARRAY (POSITION) > 0 then
Increase POS_COUNT by 1
Eles
Increase NEG_COUNT by 1
Endif
Display POS_COUNT, NEG_COUNT
ENDDO
-------------------------- ---------- ---------- ---------- --
Thank you very much in advance.....
--------------------------
The pseudocode attempts to count the number of positive & negative numbers within 10 locations that are already stored into an array & at the end of process display POS_COUNT and NEG_COUNT.
Set POSITION to 1
DO while POSITION <= 10
Increase POSITION by 1
if ARRAY (POSITION) > 0 then
Increase POS_COUNT by 1
Eles
Increase NEG_COUNT by 1
Endif
Display POS_COUNT, NEG_COUNT
ENDDO
--------------------------
Thank you very much in advance.....
Maybe you need to output pos_count and neg_count after ENDDO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
stuff