Are we supposed to be using all integers for this assignment? I am having a problem and don't know what to do. If I use integers, when I put in digits greater than 32,728 or so, my program bombs. But if I use all longs, when I do modulus arithmetic in the method I used in my first assignment, that won't work either. Any suggestions as to what I am doing wrong. I am really getting desperate. Thanks for any help I can get....
ellen, i am using a long to start the program, but then i cast to an int when i need to... something like this: int newNumber = (int)( longValue / intValue ); i also use some math to change the value of the long without the cast... that looks something like this: longValue = longValue % intValue ; i hope this helps! btw, i haven't passed 4b yet, but my nitpicks haven't been about my casting so i guess this is okay. also, if i gave too much away please tell me so i can delete this! [This message has been edited by Greg Harris (edited June 19, 2001).]
I think this sort of help should be allowed, to really find out this sort of knowledge yourself is not necessary. Learning from examples is very good too, IHMO (in my humble opinion) ;-)
Well thanks for all your help. I'll try ANYTHING just about now just to say sane. [This message has been edited by Ellen Smith (edited June 20, 2001).]
Post by:autobot
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
a bit of art, as a gift, that will fit in a stocking