foot, inches calculator

Get help with using AutoHotkey and its commands and hotkeys
204squares
Posts: 3
Joined: 21 Jul 2018, 13:43

foot, inches calculator

17 Aug 2018, 15:05

Hi Guys, I'm trying to make simple math calculator with feet & inches
for example:
enter 4-2 and 1-8
and it will calculate
4 feet * 12 inches = 48 inches +2 inches = 50 inches
1 feet * 8 inches = 12 inches + 8 inches = 20 inches
and then multiply together = 1,000 square inches

and then calculate square feet & inches
1000 square inches / 144 inches = 6.94 sq.ft.
0.94 * 12 = 11.28
therefore Answer = 6-11 (6 feet 11 inches)
thanks in advance! what am i doing wrong?

i try to make it with function too and no cigar..

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

[/code]
garry
Posts: 1419
Joined: 22 Dec 2013, 12:50

Re: foot, inches calculator

17 Aug 2018, 15:52

didn't checked , just a small example for a GUI

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

burque505
Posts: 545
Joined: 22 Jan 2017, 19:37

Re: foot, inches calculator

17 Aug 2018, 16:43

@204squares, I don't think you accounted for the fact that you have to square the inches also, and I don't think it's very common to see "12 sq.ft. 108 sq.in.", so I haven't done that.
You might look at this code to see if it will help.
Edit: Removed * 2 from answer := 1total * 2total so calculations would be correct. There still isn't any check for not entering the hyphen and an inch value.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Regards,
burque505

Return to “Ask For Help”

Who is online

Users browsing this forum: arcticir, Flipeador, GA-Fantonos, TXShooter and 70 guests