12C vs 11C program, 11C not working

12162018, 10:03 PM
(This post was last modified: 12162018 10:16 PM by Dieter.)
Post: #2




RE: 12C vs 11C program, 11C not working
(12162018 03:07 PM)calcphil12c11c Wrote: Hello this is my first post here. Welcome to the forum. :) (12162018 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. (12162018 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... 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 »

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