Odd & Even Numbers Question ?

05212017, 03:59 PM
Post: #21
(Print Post)




RE: Odd & Even Numbers Question ?
bplus for Me as you know I always think outside the Box! hence the Success of My A.R.B Chess System...up against all Odds I have shown Modern Chess engine's weaknesses!
And so it goes with other things like this Odd & Even Number problem... So 12.356 = Even 156.966 = Even 1234568.9877 = Odd For Me I wanted to find a way where Numbers have either an Odd or Even (End Number!) and it's Not exactly about if they are True Odd or Even Numbers it's the last (End Number!) that is important! I am Not able to exactly say Why! I need such a thing but a small example would be... If 12.35# Ends with an Even Number then ??? If 12.35# Ends with an Odd Number then ??? So now you can see I have made a Logic Branch using those Numbers which would Not be possible in another way! Anthony. 

The following 1 user Likes Anthony.R.Brown's post: bplus 
05212017, 04:29 PM
(This post was last modified: 05212017 04:47 PM by bplus.)
Post: #22
(Print Post)




RE: Odd & Even Numbers Question ?
Quote: For Me I wanted to find a way where Numbers have either an Odd or Even (End Number!) and it's Not exactly about if they are True Odd or Even Numbers it's the last (End Number!) that is important! OHHHHHHH, that's easy (or should be) in SmallBASIC it's this: Code Snippet: [Select] dbl = 12.35 Translate to QB64 Code Snippet: [Select] 'lastDigitOorE.bas for Anthony 20170521 B += _ 

The following 1 user Likes bplus's post: Anthony.R.Brown 
05212017, 04:37 PM
Post: #23
(Print Post)




RE: Odd & Even Numbers Question ?
bplus you may have missed it ?
figosdev's Solution... (below) looks like it works! regardless of whether a Person wants it for the Odd & Even Number problem ? or just the Last Number Problem ? function arb_float_oddeven(N) P = n str right 1 val mod 2 IFTRUE P P = "ODD" return p ELSE P= "EVEN" return p FIG Anthony. 

05212017, 04:55 PM
Post: #24
(Print Post)




RE: Odd & Even Numbers Question ?
Code Snippet: [Select] 'lastDigitOorE.bas for Anthony 20170521 Cool bplus Looks like I now have Two Solutions to the problem! Anthony. 

05212017, 04:59 PM
Post: #25
(Print Post)




RE: Odd & Even Numbers Question ?
Quote: bplus you may have missed it ?Yes! It seems I did, time for my nap. ;)) B += _ 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)
Powered By MyBB, © 20022017 MyBB Group.
Most website layout graphics on this site is © 2014  Walter Whitman. All Rights Reserved.
Most website layout graphics on this site is © 2014  Walter Whitman. All Rights Reserved.