CMPT 120 Lecture Notes - Lecture 3: Parallelogram

35 views2 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents