Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Conditions

Name: Anonymous 2011-09-03 10:01

Is it not possible to use
if(0<x<10){}

or do you have to use
if(x>0&&x<10){}

?

Name: n3n7i 2011-09-03 21:29

My personal favourite
if((x>0)+(x<10)==2) {}

Name: n3n7i 2011-09-03 22:34

...Is that something?

was trying to think of a good 2 out of 3 state example...

Hows this

if((x%2==0)+(x%3==0)+(x%5==0)==2){
     printf("Number is divisible by 2 of 3 primes less than 7");
     }


...Try doing that with &'s and Or's...?

Name: 0n3n7 2011-09-04 0:41

>>30
something like this..?
int a=0;
a = !a;

>>following 29
Now try with +3 ??
It gets ugly fast...
Fuzzy logic is it?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List