ok well hers the code i worked out can anyone see anything wrong with this
Code:
KEY
id,
age,
gen(gender),
scount(total students above 21)
mcount(male counter)
fcount(female counter)
tcount(total students)
START
Int id, age, gen, scount=0, mcount=0, fcount=0, tcount=0
Int m, M f, F
DOWHILE tcount ˇÜ 9999
DISPLAY ˇ°Enter idˇ±
READ id
IF id=1 to 9999
DISPLAY ˇ°Enter ageˇ±
IF age=16 to 25
IF age = >21
DISPLAY ˇ°Enter genˇ±
READ gen
IF gen = m, M
ADD 1 to mcount
IF else gen = f, F
ADD 1 to fcount
ELSE
DISPLAY ˇ°error messageˇ±
ENDIF
ELSE
ADD 1 to scount
ENDIF
ELSE
DISPLAY ˇ°error messageˇ±
ENDIF
ELSE
DISPLAY ˇ°error messageˇ±
ENDIF
ENDDO
COMPUTE tcount = mcount + fcount
DISPLAY scount, mcount, fcount, tcount
END
code tags