(12C Platinum) Fraction finder / integer item price calculator
04-18-2023, 01:54 PM
Post: #1
 Tritonio Junior Member Posts: 5 Joined: Apr 2023
(12C Platinum) Fraction finder / integer item price calculator
I translated another program from my Casio to 12C Platinum. This one has two ways that it can be used. It can find the simplest fraction that falls between two values, and it can also be used to price items when you can only use integer prices and sell integer amounts of the item (that was my original usecase) while also providing a range for the potential profit.

First, the program:
Code:
 001 1 002 RCL 1 003 ÷ 004 RCL 3 005 ÷ 006 INTG 007 x=0 008 1 009 STO 4 010 RCL 4 011 RCL 1 012 RCL 2 013 x 014 x 015 ENTER 016 FRAC 017 x=0 018 GTO 024 019 R↓ 020 INTG 021 1 022 + 023 ENTER 024 R↓ 025 RCL 4 026 RCL 1 027 x 028 RCL 3 029 x 030 x<->y 031 x<=y 032 GTO 036 033 1 034 STO + 4 035 GTO 010 036 RCL 4 037 R/S 038 x<->y 039 R/S 040 x<->y 041 ÷ 042 RCL 1 043 ÷

How to use it:

1) To find a simple fraction between two numbers, set R1 to 1, set R2 to the lower bound, set R3 to the upper bound. Then run the program, when it stops, that's your denominator, press R/S again to get the numerator and then again R/S to get the actual number this fraction equals.

2) To find how to price an item that costs 12.34, with profit between 10% and 20%, put 12.34 in R1, put 1.1 in R2 and 1.2 in R3. Then run the program, when it stops, that's how many items you should be selling as a package. Press R/S and you get the integer price that you should be selling the package of items at. Press R/S one more time to get the actual profit from selling a package (e.g. 1.163 would mean 16.3% profit, which would be between 10% and 20% like requested).

You can find the original program here: https://community.casiocalc.org/topic/81...x-3650p-ii
 « Next Oldest | Next Newest »

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