Upload
eugenia-ross
View
213
Download
0
Embed Size (px)
DESCRIPTION
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001 MTI Fernando Carlos Rivero II. Analysis a)Constants: There are no constants in this problem b)Variables: Input Variables (IV): IV1: How many Mexican Pesos (MP) does the user want to change IV2: Exchange Rate (ER) Output Variables (OV): OV: Dollars resulting from the MP (USD) c)Operators (OP): Arithmetic “/” (division) d)Operations: Mexican Pesos (MP) Exchange Rate (ER)
Citation preview
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
I. Definition
Change certain amount of Mexican Pesos to its equivalent in US
Dollars. (The exchange rate is not a known data)
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
II. Analysis
How many USD I will get with my “N” pesos?
What is the Exchange rate?
BBV-BancoTec
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
II. Analysis a) Constants: There are no constants in this problemb) Variables:
• Input Variables (IV): • IV1: How many Mexican Pesos (MP) does
the user want to change• IV2: Exchange Rate (ER)
• Output Variables (OV):• OV: Dollars resulting from the MP (USD)
c) Operators (OP): Arithmetic “/” (division) d) Operations: Mexican Pesos (MP) Exchange Rate (ER)
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
III. Design: Algorithm and/or Pseudo Code (You can write either the Algorithm or Pseudo Code or both)
1. Start2. Type Mexican Pesos to change3. Save into input variable (memory cell) MP, the
Mexican Pesos to change4. Type Exchange Rate (How many Mexican Pesos
are equal to ONE US Dollar)5. Save into input variable ER, the Exchange Rate6. Divide MP/ER and save the result into the output
variable US Dollars (USD)7. Print USD8. End
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
III. Design: Flow Chart
“How many Mexican Pesos do you want to change?”
MP = “Number of Mexican Pesos typed”
“Type the Exchange Rate”
1
ER = “Exchange Rate typed”
1
END
“Total US Dollars changed are: ” USD
USD = MP ER
START
Tecnológico de Monterrey Campus Estado de México Multimedia BS2001
MTI Fernando Carlos Rivero
IV. TestAssign input variables some “Run Test” values
RUN TEST NO. 11. Start2. MP = 113. ER = 11 4. USD = 11 115. USD = 16. End
RUN TEST NO. 21. Start2. MP = 203. ER = 10.654. USD = 20 10.655. USD = 1.876. End