12C vs 11C program, 11C not working
12-16-2018, 10:03 PM (This post was last modified: 12-16-2018 10:16 PM by Dieter.)
Post: #2
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: 12C vs 11C program, 11C not working
(12-16-2018 03:07 PM)calcphil12c11c Wrote:  Hello this is my first post here.

Welcome to the forum. :-)

(12-16-2018 03:07 PM)calcphil12c11c Wrote:  Have a program that convert Liters to Gallons

No, this program converts gallons to liters. It multiplies the input by 3,78.

(12-16-2018 03:07 PM)calcphil12c11c Wrote:  The 12C program works just fine. GTO 00 and input a number, convert to liters and display a negative liters. Input new number press R/S. The answer is checked to be negative and if yes just keep it negative.

No, the program checks if the number is negative, and if it is, it makes it positive (with the CHS in line 13 of the 12C program).

Anyway, I have read your post several times but I still don't understand where the problem is or what the programs are supposed to do. If you only want to convert from gallons (positive input) to liters (negative output) then the programs can be much shorter:

Code:
01 ENTER   // not really required, but just to be sure... 02 3 03 , 04 7 05 8 06 5 07 4 08 x 09 CHS 10 GTO 00

Example:
2,5 [R/S] =>   –9,46
3,9 [R/S] => –14,76
0,5 [R/S] =>   –1,89

The final GTO 00 stops the program and returns to the start at line 00, so the next [R/S] will start the program at the beginning again.

For the 11C you may simply add LBL A in the first line and replace GTO 00 with RTN. This does the same thing, it stops and returns to line 000. You may also simply press f[A] for a new calculation.

But again: where exactly is the problem?
Please give a detailled example.

BTW, on the 11C the sequence 0 X↔Y X≤Y? can be replaced with X<0? CHS, or even a single ABS command. On the 12C the sequence x² √x can be used instead.
But again, you don't need all this to convert gallons to negative liters. Take a look at the short program above.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread 12C vs 11C program, 11C not working - calcphil12c11c - 12-16-2018, 03:07 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-16-2018 10:03 PM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-16-2018, 11:31 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-17-2018, 08:39 AM RE: 12C vs 11C program, 11C not working - Thomas Klemm - 12-17-2018, 05:11 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 12:13 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-17-2018, 07:42 PM RE: 12C vs 11C program, 11C not working - ijabbott - 12-17-2018, 08:38 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 09:04 PM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-17-2018, 11:59 PM RE: 12C vs 11C program, 11C not working - Dieter - 12-18-2018, 08:50 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 12-18-2018, 11:55 AM RE: 12C vs 11C program, 11C not working - calcphil12c11c - 01-09-2019, 04:19 AM

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