CSE 1310 -- Lec 5

CSE 1310 -- Lec 5 - Formalized Notations Pseudocode A...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Formalized Notations – Pseudocode A computer can input data Read (from a file) Get (from a keyboard) A computer can output data Write (to a file or printer) Print (to the screen) A computer can assign a value to a variable Set Number to 0 Store 0 to Number Number = 0 A computer can calculate Add Number to Total Store NUM1 + NUM2 to Total Total = NUM1 * (NUM2 – NUM3 * NUM4) A computer can compare two pieces of data and select one of the two alternative actions if hours > 40 then: calculate total pay including overtime else: calculate regular pay endif A computer can repeat group of actions While still more date: read next students data compute and report grades endwhile Formalized Notations --- The Structure Theorem Sequence statement1 statement2 statement3 ... statementN Selection Simple Selection (to do or not to do) if condition then sequence
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

CSE 1310 -- Lec 5 - Formalized Notations Pseudocode A...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online