2009-06-06_120226_Program_Pseudocode

2009-06-06_120226_Program_Pseudocode - Declare option = 0;...

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

View Full Document Right Arrow Icon
Program Pseudocode: Algorithm currency_convertor() INPUT: Currency type and currency value from user. OUTPUT: Currency value and equivalent US dollar value { option := 0; value := 0; converted := 0; write (“*** Currency Convertor ***”); write (“1. Canadian dollars to US dollars”); write (“2. Mexican pesos to US dollars”); write (“3. English pounds to US dollars”); write (“4. Japanese yen to US dollars”); write (“5. French francs to US dollars”); write (“Enter the choice:”); read (option); write (“Enter the amount:”); read (value); if ( option := 1) , then converted := value * (1/1.468); else if (option := 2) , then converted := value * (1/9.5085); else if ( option := 3) , then converted := value * 1.6433; else if ( option := 4) , then converted := value * (1/104.92); else if ( option := 5) , then converted := value * (1/6.2561); else write (“Wrong Menu Selection”); write (“Entered Value:”,value); write (“US dollar equivalent:”,converted); }
Background image of page 1

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

View Full DocumentRight Arrow Icon
Other Format: Module Main()
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Declare option = 0; Declare value = 0; Declare converted = 0; Display (*** Currency Convertor ***); Display (1. Canadian dollars to US dollars); Display (2. Mexican pesos to US dollars); Display (3. English pounds to US dollars); Display (4. Japanese yen to US dollars); Display (5. French francs to US dollars); Display (Enter the choice:); Get option; Display (Enter the amount:); Get value; if ( option := 1) , then converted := value * (1/1.468); else if (option := 2) , then converted := value * (1/9.5085); else if ( option := 3) , then converted := value * 1.6433; else if ( option := 4) , then converted := value * (1/104.92); else if ( option := 5) , then converted := value * (1/6.2561); else Display (Wrong Menu Selection); End If Display (Entered Value:,value); Display (US dollar equivalent:,converted); END Main MODULE...
View Full Document

Page1 / 2

2009-06-06_120226_Program_Pseudocode - Declare option = 0;...

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