DOC PREVIEW
PSU METBD 050 - Flowcharts

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

HO-050-Flowcharts.doc Page 1 of 3 9/25/01, 1/19/05 METBD 050 Flowcharts A flowchart is a tool used to graphically represent an algorithm, which is a list of steps necessary to solve a problem or perform some activity. The flowchart consists of special geometric symbols containing a phrase to describe the step. The symbols are connected by arrows which describe the flow. The more commonly used symbols are: Symbol Name Description Flowline Connects symbols and shows the flow of the algorithm logic. Terminal Used to represent the Start and the End of the steps Input/Output Descibes data to be read into the program or printed and displayed by the program. Processing Used to describe arithmetic and data-manipulation operations. Decision Used for logic or comparison operations. The outflow path depends on the answer to the yes/no question asked. Predefined Process Represents another predefined algorithm Connector Connects different flowlines Offpage Connector Connects flowlines between sheets. Arrows connecting flowchart symbols have two meanings: 1. They show the order in which the transformations are to be performed 2. They show the pathway or “flow” of given information going into a symbol and required information coming out. The most basic type of flowchart is the sequential flowchart. In this case, the flow proceeds from the beginning of the steps to the end without any branching operations. More sophistocated flowcharts make decisions which allow the program to branch depending on the outcome of an asked question.HO-050-Flowcharts.doc Page 2 of 3 9/25/01, 1/19/05 EXAMPLE: Develop a flowchart for finding the area of a rectangle. The flowchart for this algorithm is: EXAMPLE: Develop a flowchart to sort two numbers in ascending order. Start Get Length Get Height Area = Length x Height Print Area End ABCDEF1 TITLE: Rectangle Area Calculation23 DESCRIPTION: Computes the area of a rectangle from the length4 and width parameters which are input by the user.56 PARAMETERS: Length = 27 Height = 489 CALCULATIONS:101112 Area = Length x Height = 813Cell Formula: =D6*D7 ABCDEF1 TITLE: Two Number Sort23 DESCRIPTION: Sorts two numbers into ascending order using4 an if-block.56 PARAMETERS: X = 67Y = 489 CALCULATIONS:10 Smallest = 411 Biggest = 61213Start Get the Numbers X & Y Print X, Y End Is X > Y? Print Y, XYes No Note that there are other, maybe easier, ways to do this! Can you think of one? Cell Formula: D10: =IF(D6>D7,D7,D6) D11: =IF(D6>D7,D6,D7)HO-050-Flowcharts.doc Page 3 of 3 9/25/01, 1/19/05 An If-Block is a tool used to compare two things in programming. It does one set of steps if the condition specified is true, and another set of steps or nothing if the condition is false. The general structure is: IF condition THEN Step(s) if true ELSE Step(s) if false ENDIF The “else” and step(s) if false are optional. In structured programming, the ENDIF command is required to tell the computer that it has reached the end of the If-block. This command is not used in Excel. Sometimes, the ELSE commands can be another if-block. This technique is called “nested ifs.” EXAMPLE: Develop a flowchart to determine if a number is greater than, less than, or equal to another number. ABCDE1 TITLE: Two Number Sort23 DESCRIPTION: Determine if a number X is greater than,4 less than, or equal to a number Y56 PARAMETERS: X = 67Y = 889 CALCULATIONS:10 Result: X < Y11Start Get the Numbers X and Y Print “X < Y” End Is X = Y? Print “EQUAL” Yes No Is X > Y? Print “X > Y” Yes No Cell Formula: D10: =IF(D6=D7,”EQUAL”,IF(D6>D7,”X > Y”,”X <


View Full Document
Download Flowcharts
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Flowcharts and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Flowcharts 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?