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

from /b/ plz Help

Name: Anonymous 2008-09-27 6:04

okay I am a starting cs major and I have one little snag

I get most of java so far but have to do:

is some number a multiple of 50

Now I divide the number by 50, Number/50 but dont know what to do after that.  This is due in a noon Saturday and I woke up early to do it can you guys help

Name: Anonymous 2008-10-01 17:15

>>61
Thanks for the idea:

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

int main( int argc, char *argv[] ) {
    if ( argc != 2 ) return 1;
    for ( argc = 0; argc < strlen( argv[1] ); ++argc )
        if ( argv[1][argc] < '0' || argv[1][argc] > '9' )
            return 1;
    argc = strlen( argv[1] ) == 1 ? 2 : strlen( argv[1] );
    return ! ( ( argv[1][argc-2] == '0' || argv[1][argc-2] == '5' ) && ( argv[1][argc-1] == 0 || argv[1][argc-1] == '0' ) );
}

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