# week07 - WELCOME EF 105 Spring 2006 Week 7 Topics More on...

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

WELCOME WELCOME EF 105                Spring 2006 Week 7

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

View Full Document
Topics: More on Engineering Problem Solving Algorithms Flowcharts
Problem Solving Logic Document the steps: 1. Algorithm, using pseudocode 2. Graphic, with the flowchart

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

View Full Document
Algorithm Defined ALGORITHM   an ORDERED SEQUENCE of  PRECISELY defined instructions that performs  some task in a finite amount of time.  ORDERED means that the instructions can be  NUMBERED, but an algorithm must have the  ability to ALTER the order of its instructions using a  CONTROL structure.  There are three categories of algorithmic  operations   Next Slide :
Algorithmic Operations 1. SEQUENTIAL OPERATIONS   Instructions  executed  in order 2. CONDITIONAL OPERATIONS   Control  structures that first  ask a question  to be  answered with a  true/false  answer and then  select  the  next instruction  based on the  answer 3. ITERATIVE OPERATIONS (LOOPS): Control  structures that  repeat  the execution of a block  of instructions

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

View Full Document
Pseudo Code Example Example Problem:  Calculate the bill when  someone buys a specific no. of some item: Pseudo code: PROMPT for number of items being purchased READ number of items being purchased PROMPT for price per item READ price per item CALCULATE subtotal CALCULATE tax CALCULATE total DISPLAY total
PseudoCode: Common Terms  To Describe  input output computations , etc.,  the following terms are often used: Input: INPUT, READ, GET  Output: PRINT, DISPLAY, SHOW, PROMPT Compute: COMPUTE, CALCULATE, DETERMINE  Initialize: SET, INIT  Add one: INCREMENT, BUMP Decisions: TEST, IF/THEN/ELSE, WHILE/DO

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

View Full Document
PseudoCode Algorithms Ensure that the the task is  completely  specified Issues to Consider What data is known  before  the program runs? What data must be
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 27

week07 - WELCOME EF 105 Spring 2006 Week 7 Topics More on...

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

View Full Document
Ask a homework question - tutors are online