The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(11C) Currency Converter
10-01-2018, 06:00 AM (This post was last modified: 10-01-2018 07:39 AM by Gamo.)
Post: #1
(11C) Currency Converter
Program to convert "three" foreign exchange rates.


Procedure:

[A] Rates #1
[B] Base Rates
[C] Rates #2

Store rates #1 to R0
Store rates #2 to R1

n [A] display exchange rates to B based on A rates
n [C] display exchange rates to B based on C rates

n [B] display exchange rates of A based on B rates
-n [B] display exchange rates of C based on B rates

--------------------------------------------------------------------
Example: f [USER] f [FIX] 2

1 USD (United States) =
0.862441 EUR (Euro)
0.767699 GBP (British Pound)

.862441 [STO] 0 // Rate on LBL [A] (Euro)
.767699 [STO] 1 // Rate on LBL [C] (British Pound)

5 USD is how many Euro?
5 [A] display 4.31
Answer is 4.31 Euro

5 USD is how many GBP?
5 [C] display 3.84
Answer is 3.84 GBP

20 Euro is how many USD?
20 [B] display 23.19
Answer is 23.19 USD

20 GBP is how many USD?
20 [CHS] [B] display 26.05 USD // for GBP to USD use Negative Value

--------------------------------------------------------
Program: Exchange Rates
Code:

LBL A
RCL 0
x
RTN
LBL 0
1/x
GSB A
1/x
RTN
-------------------------------------------------------
LBL B
X>0
GTO 0
1/x
GSB C
1/x
CHS
RTN
-----------------------------------------------------
LBL C
RCL 1
x
RTN

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Currency Converter - Gamo - 10-01-2018 06:00 AM
RE: (11C) Currency Converter - Dieter - 10-01-2018, 11:58 AM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 12:49 PM
RE: (11C) Currency Converter - Gamo - 10-01-2018, 01:00 PM
RE: (11C) Currency Converter - Dieter - 10-01-2018, 04:02 PM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 04:37 PM
RE: (11C) Currency Converter - Dieter - 10-01-2018, 06:05 PM
RE: (11C) Currency Converter - Albert Chan - 10-01-2018, 06:28 PM
RE: (11C) Currency Converter - Gamo - 10-02-2018, 01:53 AM



User(s) browsing this thread: 1 Guest(s)