help : "Checking if a number entered is odd using IF statement"

renzlorenzz

is there a possible way to do this using squiffy?
like this?
{if number%2=0 : statment}


DarkLizerd

Not sure it this would work... but it would sound right
if(number/2= int(number/2) {
msg("the number is even.")
}
Not sure if it should be integer instead...
or
if(number/2<> int(number/2) {
msg("the number is odd.")
}


IFforClassroom

You'd have to use javascript for anything that specialised. Squiffy's commands and Markdown only abbreviate a few extremely useful game and textual elements. In my opinion, this is a very convenient bridge for learning to code.

Otherwise, if you have a limited series of numbers, you could laboriously list them.

{if number=2:blahblah}{if number=4:blahblah}{if number =6:blahblahblah}{if number=1:yadayada} etc.

renzlorenzz

It's really hard without using javascript, I tried listing it but that will have a limit.


Log in to post a reply.

Support

Forums