Currency Conversion Design

Submitted by: Submitted by

Views: 913

Words: 619

Pages: 3

Category: Other Topics

Date Submitted: 01/02/2012 09:49 PM

Report This Essay

Currency Conversion Design

Currency Conversion Design

Get Input From The User

Enter the Amount of foreign currency that is to be converted

Select the type of foreign currency that is to be converted to U.S. Dollars

Dived the Amount of currency by the foreign currency rate

Canadian Dollars (Rate: 1 U.S. Dollars = 1.4681 Canadian Dollars

Mexican Pesos (Rate: 1 U.S. Dollar = 9.5085 Pesos)

English Pounds (rate: 1.6433 U.S. Dollar = 1 Pound)

Japanese Yen (Rate: 1 U.S. Dollar = 104.8200 Yen)

French Francs (Rate: 1 U.S. Dollar = 6.2561 Francs)

Output the converted results

Main Module

Declare Nationality as string

Declare CurrencyType as integer

Declare CurrencyType as real

Declare USDollar as real

Declare QuitProg as string

Call Input Module

Call Check Module

Call Currency Type Module

Call Canadian Module

Call Mexican Module

Call English Module

Call Japanese Module

Call French Module

Call Exit Module

Call Output Module

Input Module

Declare CurrencyType as integer

Display “Welcome to Currency Converter”

Display “Please Select A Currency” (Enter 1-6)

Display 1 Canadian Dollars

Display 2 Mexican Pesos

Display 3 English Pounds

Display 4 Japanese Yen

Display 5 French Francs

Display 6 Quit Input

Check Module

Declare CurrencyType as integer

If CurrencyType < 1 or CurrencyType > 6

Then

Display Invalid Currency Selection

Please Try Again

Call Input Module

Else

Call CurrencyType Module

End

Check Module

CurrencyType Module

Declare CurrencyType as integer

If CurrencyType = 1

Then

Call Canadian Module

Else

If CurrencyType = 2

Then

Call Mexican Module

Else

If CurrencyType = 3

Then

Call English...