if(n mod 2) =1 then ODD else EVEN
2006-09-16 23:22:01
·
answer #1
·
answered by Joseph T 2
·
2⤊
0⤋
There is no simple formula if the number is unknown.
Remember, some of the most difficult results in mathematics are based on even simpler ideas than even or odd. Andrew Wiles' proof of Fermat's Last Theorem can be seen as constructing a very complicated expression for the number of solutions that Fermat's equation can have, then spending nearly two hundred pages proving that that number is ZERO.
So the more complicated is the expression for your unknown number, the more pages you might have to use up to prove whether it is even or odd.
2006-09-17 03:15:33
·
answer #2
·
answered by Anonymous
·
0⤊
0⤋
A single-digit number is even if it is the product of 2 and something else:
2*0=0
2*1=2
2*2=4
2*3=6
2*4=8
The other digits, 1-3-5-7-9, are odd.
For multiple-digit number, just look at the last digit. E.g. 465345454345 is odd since five is odd.
If you want to program in a spreadsheet or some other application, you can check if the half of the number is an integer. In a programing language it may look like
IF x/2=round(x/2) THEN
print "x is even"
ELSE
print "x is odd"
ENDIF
In a spreadsheet,
@if(a1/2=round(a1/2);"a1 is even";"a1 is odd")
2006-09-16 23:27:05
·
answer #3
·
answered by helene_thygesen 4
·
0⤊
0⤋
even numbers can be divided by 2 . both even and odd numbers are natural numbers ' 1 2 3 ' if not divided by two it is odd .
good luck
2006-09-16 23:23:25
·
answer #4
·
answered by Anonymous
·
0⤊
0⤋
Just check out the last digit, if it's zero or some digit which is divisible by 2, then it's EVEN, otherwise ODD. Simple !!!
2006-09-16 23:32:16
·
answer #5
·
answered by Innocence Redefined 5
·
0⤊
0⤋
divide n by 2
is there a remainder? if so, then n is odd... else it is even....
(for n=1, when divided by 2, the remainder is 1...so odd)
another method, easier one:
if the unit digit (the last one) is 0,2,4,6, or 8 then n is even; else odd
2006-09-16 23:32:44
·
answer #6
·
answered by m s 3
·
0⤊
0⤋
divide n by 2
2006-09-16 23:35:25
·
answer #7
·
answered by Red Alert 1
·
0⤊
0⤋
if(nmod2==0)
printf("The number is odd");
else
printf("The number is even");
cprogramming
2006-09-16 23:49:54
·
answer #8
·
answered by Anonymous
·
0⤊
0⤋
No I don't "get it".
2006-09-17 01:21:27
·
answer #9
·
answered by curious 4
·
0⤊
0⤋