Re: Need an HP 49g+ Programming hint Message #6 Posted by Valentin Albillo on 25 May 2005, 6:16 a.m., in response to message #1 by Yiannis
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 HP71B 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.
