Posted: Mon Dec 07, 2009 11:00 pm Post subject: RE:How to count each number??? (sounds confusing? read more)
Are you sure you ran mirhagk's code on its own? I can only type eight characters using his/her code, nothing more.
Sponsor Sponsor
qmanjr5
Posted: Mon Dec 07, 2009 11:24 pm Post subject: RE:How to count each number??? (sounds confusing? read more)
Don't be rude to tony either, dude. He'll kill you
Just be patient with him, and he'll be patient with you
mirhagk
Posted: Mon Dec 07, 2009 11:30 pm Post subject: RE:How to count each number??? (sounds confusing? read more)
my code only works if you only want exaclty 8 characters (enter would be a 9)
the best way to do it would be to check the length and make sure each number is either a 1 or a 2.
Turing:
var binary:string var done:=false loop get binary
iflength(binary)=8then
done:=true for i:1..8 if binary(i)not="1"and binary(i)not="2"then
done:=false endif endfor endif exitwhen done
endloop