D34lw4p's Posts
Nairaland Forum › D34lw4p's Profile › D34lw4p's Posts
1 2 3 4 5 6 7 8 ... 22 23 24 25 26 27 28 29 30 (of 30 pages)
Have a look at the lines of code below and determine if they can be used to precisely identify if a given number is Odd?
These lines seem correct but they will return incorrect results one of every four times (Statistically speaking). Consider a negative Odd number, the remainder of division with 2 will not be 1. So, the returned result will be false which is incorrect! This can be fixed as follows:
Using this code, not only is the problem of negative odd numbers solved, but this code is also highly optimized. Since, Arithmetic and Logical operations are much faster compared to division and multiplication, the results are achieved faster so in second snippet. Join Our Programming Discussion Forum www.nct.com.ng |
use perl |
ronald4ever:Thank you very much. |
ronald4ever:she is 18years old. |
RoyalBlak007:Hello please am not joking, am very serious about what am posting here. |
Hello Nairalanders, I am 19 years old there is a girl who owns a shop beside my mum's own, anytime she sees me around i noticed something strange about the way she behave, she would just hug me and even go as far as kissing me right in front of my mum. Am kind of confused cos i dont expect her to be behaving the way she is doing, she would go as far as calling me her husband and all that, there was a day she was trying to get me to have sex with her,seriously i never discussed anything about relationship with her but she has been doing this same thing for more than a year now and am totally confused on what to do. Seriously i really like the girl but the way she is behaving toward me is too pushy cos she is doin to me what i should be doing what i should be doin to her assuming we are dating. Please Matured Nairalander your help is needed. What do you suggest i do? |
Kayoski:what will i gain if its not genuine. I only post the best in my forum. |
FUTA takes 'PASS' FOR ENGLISH IF YOU WANT TO STUDY SCIENCE COURSE |
post your questions at www.nct.com.ng programmers are there to help you seu04:post your questions at www.nct.com.ng programmers are there to help you |
1 2 3 4 5 6 7 8 ... 22 23 24 25 26 27 28 29 30 (of 30 pages)