Requesting help again... as a beginner....

new topic     » topic index » view thread      » older message » newer message

Okay, I got started writing a math program, and I wanted to know is there a way to make the statement 'if' do something only if it gets an odd number. For example...

atom a a = gets(KEYBOARD) if a = ODDNUMBER then ... puts(1,"\nThat is an odd number.") end if

How do I make it so that if a person types in an odd number, then that message would come up? What do I put in place of 'ODDNUMBER'? Sorry, I couldn't think of an easier way to say that question, but I hope you understand what I am asking.... Also, would all of that be right in syntax? I put it in .exw, if that matters, and I am using Euphoria 3.1.1. And.... what is \n used for? I am basing this off of the source code of the demo Animal. I did read what /n does in ABGTE, but I didn't understand. It said something like:

Data has outputted in text mode has carriage return codes (13 or ‘\r’) added before any line feed codes (10 or ‘/n’)

Can someone explain it to me a little bit better? Or is that the simplest form it can be explained in? Thanks for the help!

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu