Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19656

Re: How to do Combinations/Permutations in BlueJ

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: How to do Combinations/Permutations in BlueJ
Date Wed, 07 Nov 2012 23:03:17 -0800
Organization A noiseless patient Spider
Lines 19
Message-ID <k7flfo$3bv$1@dont-email.me> (permalink)
References <9b534783-eb45-458d-8abb-a4c890553971@googlegroups.com> <8d95d877-c3c3-4d36-97f2-389424fdfc43@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 8 Nov 2012 07:03:20 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="3455"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SVmK9nyTBMS/NI/w7ulIg6VlMGQS1Wp4="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
In-Reply-To <8d95d877-c3c3-4d36-97f2-389424fdfc43@googlegroups.com>
Cancel-Lock sha1:GKE4yxTXNhmW1GGnAQ92dX/gT1k=
Xref csiph.com comp.lang.java.programmer:19656

Show key headers only | View raw


On 11/7/2012 8:53 PM, lebaz95@gmail.com wrote:
> On Wednesday, November 7, 2012 8:28:19 PM UTC-6, leb...@gmail.com
> wrote:
>> I would like to create a program that will do problems like
>> (xa+yb)^z. But I would need to do things like (5!/3!(5-3)!) How
>> would I get this done?
>
> rslt = 1; for(i = e; i > 0; i --) { rslt *= i; }
>
> I asked my brother and he helped me. e in this program is a user
> input so you may replace it as you see fit.


In the real world, people call this a factorial.  Here's a fun article 
on the subject:

<http://chaosinmotion.com/blog/?p=622>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to do Combinations/Permutations in BlueJ lebaz95@gmail.com - 2012-11-07 18:28 -0800
  Re: How to do Combinations/Permutations in BlueJ lebaz95@gmail.com - 2012-11-07 20:53 -0800
    Re: How to do Combinations/Permutations in BlueJ markspace <-@.> - 2012-11-07 23:03 -0800
      Re: How to do Combinations/Permutations in BlueJ Gene Wirchenko <genew@ocis.net> - 2012-11-08 11:16 -0800
    Re: How to do Combinations/Permutations in BlueJ Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-08 09:10 -0500
      Re: How to do Combinations/Permutations in BlueJ Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-11-08 10:48 -0500
        Re: How to do Combinations/Permutations in BlueJ Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-08 13:18 -0500
          Re: How to do Combinations/Permutations in BlueJ Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-11-08 23:14 -0500
  Re: How to do Combinations/Permutations in BlueJ Arne Vajhøj <arne@vajhoej.dk> - 2012-11-08 15:52 -0500

csiph-web