CurrencyConversionCode

CurrencyConversionCode - Write “Currency total in...

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

View Full Document Right Arrow Icon
Main Module Declare CurrencyType as string Declare InternationalTotal as integer Declare USTotal as integer Declare CanadianDollars, MexicanPesos, JapaneseYen, EnglishPound, FrenchFrancs as real Declare option to quit as character Y or N Get User Input Determine international currency type Convert international currency to U.S. dollars Multiply international currency total by rate of exchange to find U.S. total dollars Display equivalent U.S. total dollars Display option for user to quit program End Main Module Input Data Module Repeat Write “This program converts international currency to U.S. Currency.” Write “Select international currency: CanadianDollar, MexicanPesos, EnglishPounds, JapaneseYen, FrenchFrancs Input CurrencyType Write “What is the total amount of currency?” Input InternationalTotal End Input Data Module Convert Currency Module If (CurrencyType = CanadianDollars) Then InternationalTotal * 1.4680 = USTotal End If
Background image of page 1

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

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Write “Currency total in Canadian Dollars is = $ USTotal” If (CurrencyType = MexicanPesos) Then IntenationalTotal * 9.5085 = USTotal End If Write “Currency total in Mexican Pesos is = $ USTotal” If (CurrencyType = EnglishPounds) Then InternationalTotal * 1.6433 = USTotal End If Write “Currency total in English Pounds is = $ USTotal” If (CurrencyType = JapaneseYen) Then InternationalTotal * 104.9200 = USTotal End If Write “Currency total in Japanese Yen is = $ USTotal” If (CurrencyType = FrenchFrancs) Then InternationalTotal * 6.2561 = USTotal End If Write “Currency total in French Francs is = $ USTotal” Output Data Module Display equivalent USTotal Write “Do you want to exit the currency conversion program Y or N?” If (Input = N) Then Display Convert Currency Module End If If (Input = Y) Then Write “Have a good trip.” End if Exit Program End Output Data Module...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

CurrencyConversionCode - Write “Currency total in...

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