CMPT 120 Lecture Notes - Lecture 3: Parallelogram
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Step 3 : read the value of variable n. Step 4 : compute integer remainder of n divided by 2 and store it in r. Step 5 : if r = 0 then print n is an even number. Step 6 : else print n is an odd number. Flowchart is a graphical representation of an algorithm. Meaning of shapes: oval ---> terminal : to mark start or end a flowchart, parallelogram ---> i/o : to show an input or output operation: Read data from keyboard/user, or print/display on screen: rectangle ---> to show a process : Compute average, computer salary, add numbers: rhombus ---> to show a decision point , or alternatives, arrow ---> flowline : to connect two steps / shapes / processes. If marks > 50, then pass , else fail . Step 2 : declare variables n1, n2, and n3. Step 3 : read variables n1, n2, and n3.