Statistics: Posted by burger2227 — Thu Dec 25, 2008 6:01 pm
Statistics: Posted by burger2227 — Thu Dec 25, 2008 5:01 pm
Dos this program not satisfy your question?:I would really like to see a program that does not use integers and can tell me if the Single or Double value is divisible by 2.
Code:
again:CLSPRINT " To determing if a number is divisible by 2, enter number:"LOCATE , 2LINE INPUT num$num = VAL(num$)IF INT(num) <> num THEN decimals = LEN(num$) - INSTR(num$, ".") numINT = VAL(num$) * 10 ^ decimalsELSE numINT = numEND IFLOCATE CSRLIN - 1IF numINT AND 1 THEN PRINT " "; num$; " is NOT divisible by 2 "ELSE PRINT " "; num$; " is divisible by 2"END IF
Statistics: Posted by Ralph — Thu Dec 25, 2008 11:38 am
Statistics: Posted by moneo — Wed Dec 24, 2008 8:02 pm
Statistics: Posted by moneo — Wed Dec 24, 2008 8:01 pm
Statistics: Posted by Ralph — Wed Dec 24, 2008 6:18 pm
Statistics: Posted by moneo — Fri Dec 19, 2008 10:19 pm
Code:
CLSPRINTREM Using single precision with decimals, some of the mess is removed.DIM k AS SINGLEFOR k = 1 TO 4 STEP .125PRINT k,NEXTPRINTFOR k = 2 TO 4 STEP .125PRINT k,NEXTPRINTPRINTFOR k = 2.25 TO 4 STEP .125PRINT k,NEXTPRINT
Statistics: Posted by burger2227 — Fri Dec 19, 2008 1:23 pm
Code:
CLSPRINTREM Using single precision with decimals, some of the mess is removed.DIM k AS SINGLEFOR k = 1 TO 4 STEP .1PRINT k,NEXTPRINTFOR k = 2 TO 4 STEP .1PRINT k,NEXTPRINTPRINTFOR k = 2.3 TO 4 STEP .1PRINT k,NEXTPRINT
Statistics: Posted by Ralph — Thu Dec 18, 2008 5:39 pm
Statistics: Posted by burger2227 — Wed Dec 17, 2008 12:52 pm
Statistics: Posted by roy — Wed Dec 17, 2008 5:08 am