Currency Conversion
Not what you're looking for?
Start Main Module
Declare selection as integer
Declare currencyType as Integer
Declare internationalValue as real
End Main Module
Display Menu
Display "Welcome to the international currency conversion program"
Display "Please make a selection"
Display "International Currency Types:"
Display "1: Canadian Dollars"
Display "2: Mexican Pesos"
Display "3: English Pounds"
Display "4: Japanese Yen"
Display "5: French Francs"
Display "6: Quit"
Display "Enter a selection:"
Input currencyType
If currencyType >= 1 AND currencyType <= 5 then
elseif currencyType = 6
Display "Quitting Currency Conversion"
Display "Error 4: Invalid menu selection."
End Display Menu
Get International Value
Declare value as integer
Display "Enter a currency value (positive number): "
Input internationalValue
if internationalValue > 0 AND internationValue <= XXXXXXX then
Display "Error 1: Invalid input--Negative Number"
continue = true
Convert Currency
Declare rate as real
Select Case of currencyType
case 1:
Set rate = 1.4680
case 2:
Set rate = 9.5085
case 3:
Set rate = .6085
case 4:
Set rate = XXX.XXXX;
case 5:
Set rate = 6.2561
default:
Set rate = 0.0
End Case
USValue = rate * internationalValue
End Convert Currency
Display Results
Select Case of currencyType
case 1
nation = "Canadian"
currency = "Dollars"
case 2
nation = "Mexican"
currency = "Pesos"
case 3
nation = "English"
currency = "Pounds"
case 4:
nation = "Japanese"
currency = "Yen"
case 5
nation = "French"
currency = "Francs"
default:
nation = "No country"
currency = ""
end case
Display "The value of ", internationalValue, " " , nation, " ", currency, " is ", USValue, " dollars"
Display "Error 5: Invalid currency type."
End Display Results
Purchase this Solution
Solution Summary
The expert examines currency conversion. The expert incorporates any changes recommended by the instructor.
Purchase this Solution
Free BrainMass Quizzes
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.