Hello

:confused:
I just started a programming class and stuck in a section of my assigment. i would like to know if someone could guide me to the right direction.

Last instruction:

" Write a script that reads an integer and determines and output XHTML text that displays whether it it odd or even.{hint: use the remainder operator. An even numder is a muiple of 2.
Any multiple of 2 leaves a remainder of zero when divided by 2.}

I would apreciate this a lot.

Moussa

"remainder " is referred to as modulus and modulus operator is %
you should be able to code it from this short sample or read through the link above

if( variable % 2 = 0 ) { // do something along the lines of document.write
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.