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-09-29 17:27

>>53
actually it should be....

    public static void mult50(int number) {
       
        double logNumDiv50 = Math.log(number/50);
       
        if(logNumDiv50 < 2) {
            System.out.println(number+": multiple of 50");
        } else {
            System.out.println(number+": not a multiple of 50");
        }
    }

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