Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9912
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: mod calculation |
| Date | 2011-11-13 08:56 -0800 |
| Organization | Canadian Mind Products |
| Message-ID | <2etvb7hs8oa1s4r2p9tregsj117n1946oj@4ax.com> (permalink) |
| References | <c884824e-9b4a-4df5-8d4a-3dddd6e41bea@d37g2000prg.googlegroups.com> |
On Sun, 13 Nov 2011 08:20:12 -0800 (PST), Chad <cdalten@gmail.com> wrote, quoted or indirectly quoted someone who said : >//read data1 and data2 from the file >anyNewArrival = (((data1%100)+1) <=50); >serviceTime = (data2%5)+1); For the usual mod gotchas, see http://mindprod.com/jgloss/modulus.html Most of the trouble comes when there are negative numbers involved. You also might like to brush up on precedence. http://mindprod.com/jgloss/precedence.html The question I would ask myself is, "Which results do I agree with, my prof's or my program's?". If "my program's", consider the possibility you could have misunderstood the question, heard the prof incorrectly or failed to take accurate notes during the class. -- Roedy Green Canadian Mind Products http://mindprod.com I can't come to bed just yet. Somebody is wrong on the Internet.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mod calculation Chad <cdalten@gmail.com> - 2011-11-13 08:20 -0800
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-13 08:56 -0800
Re: mod calculation Chad <cdalten@gmail.com> - 2011-11-13 09:26 -0800
Re: mod calculation Steve Sobol <sjsobol@JustThe.net> - 2011-11-13 13:08 -0800
Re: mod calculation Chad <cdalten@gmail.com> - 2011-11-13 13:12 -0800
Re: mod calculation Patricia Shanahan <pats@acm.org> - 2011-11-13 13:49 -0800
Re: mod calculation Patricia Shanahan <pats@acm.org> - 2011-11-13 09:02 -0800
Re: mod calculation Chad <cdalten@gmail.com> - 2011-11-13 09:09 -0800
Re: mod calculation Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 20:20 +0000
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-14 09:55 -0800
Re: mod calculation Patricia Shanahan <pats@acm.org> - 2011-11-15 13:05 -0800
Re: mod calculation Gene Wirchenko <genew@ocis.net> - 2011-11-15 14:17 -0800
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-17 07:23 -0800
Re: mod calculation Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-17 07:51 -0800
Re: mod calculation Lew <lewbloch@gmail.com> - 2011-11-17 09:35 -0800
Re: mod calculation Gene Wirchenko <genew@ocis.net> - 2011-11-17 10:10 -0800
Re: mod calculation Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-17 19:09 +0000
Re: mod calculation Patricia Shanahan <pats@acm.org> - 2011-11-17 14:17 -0800
Re: mod calculation Arne Vajhøj <arne@vajhoej.dk> - 2011-11-19 21:11 -0500
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 20:35 -0800
Re: mod calculation Arne Vajhøj <arne@vajhoej.dk> - 2011-11-19 21:13 -0500
Re: mod calculation Gene Wirchenko <genew@ocis.net> - 2011-11-19 23:47 -0800
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-18 20:54 -0800
Re: mod calculation Lew <lewbloch@gmail.com> - 2011-11-19 08:34 -0800
Re: mod calculation Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-19 21:16 +0000
Re: mod calculation Lew <lewbloch@gmail.com> - 2011-11-19 16:11 -0800
Re: mod calculation Arne Vajhøj <arne@vajhoej.dk> - 2011-11-19 21:13 -0500
Re: mod calculation Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-20 08:45 +0000
Re: mod calculation Lew <lewbloch@gmail.com> - 2011-11-20 08:12 -0800
Re: mod calculation Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-20 19:42 +0000
Re: mod calculation spk <jhic@speak.invalid> - 2011-11-20 23:18 -0400
Re: mod calculation thoolen <th00len@th0lenbot.thorium> - 2011-11-21 02:11 -0500
Re: mod calculation Roedy Green <see_website@mindprod.com.invalid> - 2011-11-19 13:40 -0800
csiph-web