3ProgramStructureII

# 3ProgramStructureII - Program Structure II Functions...

This preview shows pages 1–5. Sign up to view the full content.

(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 3. Program Structure II - 1 http://www.cs.cityu.edu.hk/~helena Program Structure II Program Structure II Functions Example: Marks to Grades Conversion Parameters and Return Statement Use of Variables Comments Flowchart Example: Find Highest Mark Introduction to Variables Use of Local Variables and Global Variables Example: Counter [Please switch off your phone]

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 3. Program Structure II - 4 http://www.cs.cityu.edu.hk/~helena <input type="button" value="Convert" onclick=" if (document.F1.CMark.value>80) document.F1.CGrade.value='A'; else if (document.F1.CMark.value>65) document.F1.CGrade.value='B'; else if (document.F1.CMark.value>45) document.F1.CGrade.value='C'; else document.F1.CGrade.value='F'; if (document.F1.EMark.value>80) document.F1.EGrade.value='A'; else if (document.F1.EMark.value>65)
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/10/2012 for the course CS 1301 taught by Professor Dr.wong during the Winter '08 term at City University of Hong Kong.

### Page1 / 12

3ProgramStructureII - Program Structure II Functions...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online