Need an HP 49g+ Programming hint « Next Oldest | Next Newest »

 ▼ Yiannis Unregistered Posts: 3 Threads: 2 Joined: Jan 1970 05-24-2005, 08:33 PM Hello! I would appreciate if anyone could help me out with this little problem I have got... I need to create a quite simple program where I put the figures that represent the coefficients of more than one equations and get the results for each one of them instantaneously. I already know how to work this out when I have one output equation. To make more clear of what I need... let say I need a program that when I fill in the dimensions of a parallelogram (i.e its height and length) I get its area, volume and perimeter and then sum of the perimeter and the area. Input h: and l: Output P: A: V: and P+A Thank you very much for your time in advance!! Edited: 24 May 2005, 8:55 p.m. ▼ Chris Dean Unregistered Posts: 120 Threads: 9 Joined: Aug 2005 05-25-2005, 02:21 AM Yiannis I hope this helps. I am only a relative novice with HP49G+ programming. I must admit it seems quite challenging! The program below finds the area and perimeter of a rectangle and then adds them for given inputs H and L. <<'H' STO 'L' STO '2*(H+L)' 'P' STO 'H*L' 'A' STO <> ->NUM <

> ->NUM <<'A+P'>> ->NUM >> I hope this helps in some way. I do apologise but I do not know how to format the program. Can anyone tell me how to format? Regards Chris Dean ▼ GWB Unregistered Posts: 88 Threads: 10 Joined: Jan 1970 06-01-2005, 09:41 PM Chris Dean wrote: Quote: I do apologise but I do not know how to format the program. Can anyone tell me how to format? Please take a look at "advanced formatting techniques": For example, if you want to format your program so that it looks like the way it's listed on the 49G+, edit your posting like this: ```[pre] <<'H' STO 'L' STO '2*(H+L)' 'P' STO 'H*L' 'A' STO << A >> ->NUM << P >> ->NUM << 'A+P' >> ->NUM >> [/pre] ``` Cheers, Gerson Edited: 1 June 2005, 10:12 p.m. ▼ Chris Dean Unregistered Posts: 120 Threads: 9 Joined: Aug 2005 06-02-2005, 08:29 AM Gerson Thanks for the information Chris EL Unregistered Posts: 28 Threads: 6 Joined: Dec 2007 05-25-2005, 02:37 AM Yiannis, Here's an example for a rectangle. I tried this, and it works: << -> h l << "area" 'h*l' ->NUM "perim" '(2*h)+(2*l)' ->NUM >> >> Don't worry about carriage returns. Type the program exactly as above, and then press ENTER. Type 'yourprogname' and press STO. To use it, first enter the two values: val1 SPC val2 and then press the softkey for 'yourprogname' or just type the name and press EVAL. For example, for my rectangle, I type 3 SPC 4 ENTER and then press the 'yourprogname' softkey. it outputs: "area" 12 "perim" 14 Hope this helps, EL Valentin Albillo Unregistered Posts: 1,755 Threads: 112 Joined: Jan 2005 05-25-2005, 06:16 AM Hi, Yiannis: Yiannis posted: "say I need a program that when I fill in the dimensions of a parallelogram (i.e its height and length) I get its area, volume and perimeter and then sum of the perimeter and the area. Input h: and l: Output P: A: V: and P+A" Excuse me but I couldn't resist, my mathematical guts just gave a jump upon reading your 'example'. I know that you intend it as just an example, not an actual need, but certainly it was as bad an example as it gets, namely: Giving just height (h) and length (l), there's no way you can compute its volume (V), you need an additional parameter for that, namely the width (w) Computing "sum of the perimeter and the area (P+A)" is absolutely nonsensical, their dimensionality is different and there's no way they can be added up meaningfully. It's like asking for the sum of volts and pounds ! :-) That said, good luck with your 48/49 programming. For the HP-71B you'd simply use something like this: ```10 INPUT H,L 20 P=2*H+2*L 30 A=H*L 40 V=A*W 50 PRINT P,A,V,P+A ``` Best regards from V.

 Possibly Related Threads… Thread Author Replies Views Last Post Now where the heck did this calc come from?...a hint, perhaps? Dallas Osborne 5 1,702 02-04-2008, 09:13 PM Last Post: Dallas Osborne Re: Porting 49G Programs to 49G+/50G Les Wright 0 776 02-21-2007, 10:16 AM Last Post: Les Wright Porting 49G Programs to 49G+/50G Les Wright 6 2,062 02-20-2007, 06:27 PM Last Post: Tim Wessman HP 49g+ programming question Anders 4 1,414 08-14-2006, 05:51 PM Last Post: Happy HP User TI-57 Emulator for HP-48S/SX/G/G+/GX, HP-49G and HP-49G+ is finished HrastProgrammer 9 2,706 01-17-2006, 12:57 AM Last Post: HrastProgrammer HP 49G + Programming help Chris 2 915 05-15-2005, 11:55 AM Last Post: Marx Pio Custom Programming vs. Pre-packaged programming Eddie Shore 3 1,478 01-24-2005, 03:42 AM Last Post: Karl Schneider 49G+ programming features Standa(CZ) 4 1,386 06-08-2004, 09:20 AM Last Post: Standa(CZ) HP 49G vs. HP 49G+ Prices Ed Look 5 1,580 10-24-2003, 12:43 AM Last Post: Ed Look HP 49G Keyboard and future HP 49g's Nick Nicholas 1 937 05-31-2003, 10:26 AM Last Post: R Lion

Forum Jump: