|
I am stuck at the average student age, can i put it this manner?
STD_NO STD_NAME GENDER AGE SUBJECT NATIONALITY
---------------------------------------------------------------------------
1001 Albert Male 20 Programing England
1002 Boey Male 21 Engineering Indonesia
1003 Chan Mei Ling Female 21 Graphic Design China
1004 Dahnia Female 22 Networking India
1005 Melanie Female 23 Multimedia Philipines
1006 Yung Hua Male 24 Multimedia Indonesia
1007 Gerry Male 24 Multimedia Indonesia
1008 Canny Liew Female 24 Networking Malaysia
1009 Ben Low Male 26 Programing Singapore
================================================== =========================
1. Initialize Total_Std_Count = 0
2. Initialize Total_Female_Std = 0
3. Initialize Age =
4. OPEN STUDENT_FILE
5. READ a Record (NATIONALITY, SUBJECT, AGE, GENDER)
6. LOOP UNTIL end of file
7. IF every "NATIONALITY" matches "Indonesia" AND
8. IF every "SUBJECT" matches "Multimedia" THEN
Add 1 to Total_Std_Count
DISPLAY TOTAL_STD_COUNT
9. ELSE
DISPLAY "NO_STD_RECORD_FOUND"
10. ENDIF
11. IF every Gender = Female THEN
Add 1 to Total_Female_Std
DISPLAY Total_Female_Std
ELSE
DISPLAY "NO RECORD FOUND"
12. ENDIF
13. IF STD_NO < 1010 THEN
Add 1 to Total_Std_Count
ELSE DISPLAY "ERROR"
14. How to i add the age? Please help me here thanks.
|