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

C program

Name: Anonymous 2010-07-13 18:06

Make me a C program that reads given two integers (no limits) and outputs the largest.

Do this in a proper GNU hello.c way.

Name: Anonymous 2010-07-13 20:42


#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
        char __=0,*_o=1[argv],*o_=2[argv];
        strlen(_o)>strlen(o_)?--__:strlen(o_)>strlen(_o)?++__:__;
        if (!__)
                for (; *_o&&*_o==*o_ || (*_o?--__,*_o>*o_?__:--__:__)&&0;++_o,o_++);
        return (printf)("%d\n",!__?~~0:++__?2:1) *0;
}

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