If so, I would like to see the code.
If so, I would like to see the code.
You show me yours and I'll show you mine.
It's as simple as this:
-PreludeCode:if ( number % 2 ) cout<<"Even"<<endl; else cout<<"Odd"<<endl;
My best code is written with the delete key.
what do you mean "even or odd calculating program"?
One that gives you a number and tells you if its even or odd?
or one that only gives u even or odd random numbers?
>if ( number % 2 )
does the % sign mean "Can be divided by"?
(i am a bit newbie to C++ )
% tells you the remainder of a division operation. So if you divide by two and there's nothing left over then the number is even. You can perform the same calculation with the bitwise AND, but I won't get into that
-Prelude
My best code is written with the delete key.
ooooooooooooooo okay
I mean a program that determines whetever a number is even or odd.
Look up the modulus (%) operator.