[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2019-03-22T12:13:06-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/10258 2019-03-22T12:13:06-05:00 2019-03-22T12:13:06-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=33528#p33528 <![CDATA[Re: Formula]]> Statistics: Posted by knothead1008 — Fri Mar 22, 2019 12:13 pm


]]>
2019-03-19T07:11:50-05:00 2019-03-19T07:11:50-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=33522#p33522 <![CDATA[Re: Formula]]>

Code:

Pi = 4 * ATN(1)   'SINGLE precisionPi# = 4 * ATN(1#) 'DOUBLE precisionPRINT Pi, Pi#  
The QB64 _PI function returns π as a _FLOAT value with an optional multiplier parameter.

Code:

radius = 5circlearea = _PI(radius ^ 2)PRINT circlearea
https://www.qb64.org/wiki/ATN

Statistics: Posted by burger2227 — Tue Mar 19, 2019 7:11 am


]]>
2019-03-15T16:11:41-05:00 2019-03-15T16:11:41-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=33519#p33519 <![CDATA[Formula]]> User inputs a fractional lace size, ie (1/8).
Then,
User inputs the diameter of the circle they're going to cut from in inches ie (12 inches round).
Then in the code it calculates the yield of lace that the user inputs from the above user inputs.

What I'd really like to do is include MM in that user inputs and yields. I would also, like to save it to a text file for more user manipulation.
I'm wondering if PI can be used in the MM calculations or not.
I'll also post the code once I have it all typed out.

Thanks for your time and reply.
Brian.

Code:

50 DIM F$(35): DIM D(35)60 FOR X = 1 TO 30    70 READ F$(X), D(X)80 NEXT X100 INPUT "ENTER WIDTH OF LACE FRACTION ie(1/8)"; L$110 IF L$ = " " THEN L$ = "1/16"120 FOR X = 1 TO 30    130 IF L$ = F$(X) THEN FL = X140 NEXT X200 INPUT "ENTER DIAMETER OF CIRCLE TO BE CUT IN INCHES"; C210 IF C = 0 THEN C = 3220 CLS: PI = 3.1416: DD = C: R = 0250 PRINT TAB(40); "CIRCLE DIAMETER": PRINT260 PRINT "WIDTH OF LACE";270 PRINT TAB(20); C; TAB(32); C + 1; TAB(43); C + 2; TAB(53); C + 3; TAB(64); C + 4; TAB(75); C + 5300 IF R > 9 THEN 420310 PRINT: PRINT F$(FL);320 PRINT TAB(7); D(FL); TAB(16);330 FOR Y = 1 TO 6    340 CD = C: TL = 0    350 D = CD * PI    360 CD = CD - (2 * D(FL))    370 TL = TL + D    380 IF CD > 1 THEN 350    390 PRINT USING "  ###.## YD"; TL / 36;400 C = C + 1: NEXT Y410 R = R + 1: C = DD: FL = FL + 1: PRINT: GOTO 300420 T$ = INKEY$: IF T$ = "C" OR T$ = "c" THEN 100 ELSE GOTO 420' -------------- END CODE -------------------------------------------------' ------------------ BEGIN DATA SETS ----500 DATA "1/16",0.0625,5/64,0.0781,3/32,0.0938,7/64,0.1094,1/8,0.125,9/64,0.1406,5/32,0.1563,11/64,0.1719,3/16,0.1875,13/64,0.2031510 DATA 1/2,.5,12.700,33/64,.5156,13.096,17/32,.5312,13.493,35/64,.5469,13.890,9/16,.5625,14.287,37/64,.5781,14.684,19/32,.5937,15.081,39/64,.6094,15.478,5/8,.625,15.875,41/64,.6406,16.271,21/32,.6562,16.668,43/64,.6719,17.065,11/16,.6875,17.462,45/64,.7031,17.859,23/32,.7187,18.256,47/64,.7344,18.653,3/4,.75,19.050,49/64,.7656,19.446,25/32,7812,19.843,51/64,.7969,20.240,13/16,.8125,20.637,53/64,.8281,21.034,27/32,.8437,21.431,55/64,.8594,21.828,7/8,.875,22.225,57/64,.8906,22.621,29/32,.9062,23.018,59/64,.9219,23.415,15/16,.9375,23.812,61/64,.9531,24.209,31/32,.9687,24.606' ----------------- END DATA SETS --------

Statistics: Posted by knothead1008 — Fri Mar 15, 2019 4:11 pm


]]>