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

Pages: 1-

Halp!!!

Name: Anonymous 2010-03-13 23:40

for (i=0;(x<z) && (x>y) && (x!=i); i++){
    x+=i;
    printf("%d\n",x);
  }

Write a loop equivalent to the for loop above without using && or ||.

How do I do it /prog/

Name: Anonymous 2010-03-13 23:45

NO EXCEPTIONS

Name: Anonymous 2010-03-13 23:47

>>1
switch to python

Name: Anonymous 2010-03-13 23:47

>>3
oops forgot my sage

Name: Anonymous 2010-03-13 23:59

Don't do the kid's homework!

Name: Anonymous 2010-03-14 0:07

Hmmm, harder to troll /prog/ then I thought, well, back to /g/ then

Name: Anonymous 2010-03-14 5:01

>>1
use | instead of &&?

Name: Anonymous 2010-03-14 5:15

Hax my anus.

Name: Anonymous 2010-03-14 6:15

for (i=0;(x<z) & (x>y) & (x!=i); i++){
    x+=i;
    printf("%d\n",x);
  }

Name: Anonymous 2010-03-14 6:40


for (i=0;(x<z)*(x>y)*(x!=i);i++){
  x+=i;
  printf("%d\n",x);
}


was the best solution I found to stay away from '&' and '&&'

Name: Anonymous 2010-03-14 7:43

START:
    IF X > Z THEN GOTO END;
        IF X < Y THEN GOTO END;
            IF X = 0 THEN GOTO END;
                INCREMENT X
                WRITE X
                GOTO START;
END:

Name: Anonymous 2010-03-14 7:45

>>11
GOTO considered harmful

Name: Anonymous 2010-03-14 8:18

>>12
point considered completely missed

Name: Anonymous 2010-03-14 14:32

>>12
http://meyerweb.com/eric/comment/chech.html

>>13
Don't be so hard on him, reading comprehension is a banned subject in imageboard schools.

Name: Anonymous 2011-02-03 3:44

Name: Anonymous 2013-08-31 7:24


I liked the atmosphere of couple first episodes very much, then there were many rather uninteresting plot developments but overall very feel giving and satisfying experience.

Name: Anonymous 2013-08-31 8:08


A neutron bomb is the opposite of what you want for this sort of thing. The point of a traditional fission or fusion bomb is to release great energy in the form of physical shocks and heat to primarily cause burning and overpressure damage to targets.

Name: Anonymous 2013-08-31 8:54


Teach a man to fish, and you just eliminated your customer base idiot. Their ignorance was your job security as a restaurant owner ! Now you have to face a foreclosure! Are you proud of yourself? Are you?

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