Evaluate binomial coefficients: Difference between revisions

Content added Content deleted
Line 1,043: Line 1,043:


val Array(n, k) = args.map(_.toInt)
val Array(n, k) = args.map(_.toInt)
println("The Binomial Coefficient of %d and %d equals %s.".format(n, k, binomialCoefficient(n, k)))
println("The Binomial Coefficient of %d and %d equals %,3d.".format(n, k, binomialCoefficient(n, k)))
}</lang>
}</lang>


Output:
Output:
<lang>java Binomial 100 30
<lang>java Binomial 100 30
The Binomial Coefficient of 100 and 30 equals 29372339821610944823963760.</lang>
The Binomial Coefficient of 100 and 30 equals 29,372,339,821,610,944,823,963,760.</lang>


=={{header|Scheme}}==
=={{header|Scheme}}==