It 210 Week 4 Control Flow Diagram and Code

Only available on StudyMode
  • Download(s) : 352
  • Published : May 2, 2011
Open Document
Text Preview
Control Flow Diagram—Main Control
[pic]

Control Flow Diagram—Display Menu
| | |[pic] |

Control Flow Diagram—Get_Int_Value
| | |[pic] |

Control Flow Diagram—Convert Currency
| | |[pic] |

Control Flow Diagram—Display_Results
|[pic] |

Pseudocode Example

Main Module
Declare currencyType as Integer
Declare internationalValue as real
Declare USValue as real

currencyType = 1 \ Comment: set currencyType to some number less than 6 \ to drop into the Do While loop below

Do While currencyType < 6
Call Display Menu \Comment: if the user selects 6 in the Display Menu \ module then the user wants to Quit.
If currencyType >= 1 and currencyType 6
\ to drop into the Do While loop)

Do While (currencyType < 1 OR currencyType > 6)
Display "Currency conversion program"
Display "Please make a selection"
Display "1: Canadian Dollars"
Display "2: Mexican Pesos"
Display "3: English Pounds"
Display "4: Japanese Yen"...
tracking img