0 Members and 1 Guest are viewing this topic.
If N-A*int(N/A)=0Disp "When I divide N by A, I get an integer"End
fPart will return the decimal of any number, and not() will turn any non-zero number into 0, and vica versa, so if there is a decimal, the fpart extracts that, and the Not() inverts it
If fPart(A/2)// CODEEnd
If not(Remainder(N,AThen//code End
Remainder(N,A->XIf X=Ybla bla bla...
but i wouldn't recommend it since it doesn't work on OS 2.43 or lower...
Prompt N,AIf not(fPart(N/AThenDisp "DIVISIBLEElseDisp "NOT DIVISIBLEEnd
Prompt N,Anot(fPart(N/ADisp sub("NOT DIVISIBLE",1+4Ans,13-4Ans
Prompt N,A"DIVISIBLEIf fPart(N/A"NOT "+AnsDisp Ans