Source code of Binomial programming in java

Wednesday, March 18, 2009

import java.io.*; import java.lang.Math; class Binomial { public static void main(String args[])throws IOException { String x,n; int i=1; double a,b,y=1; double sum=1; BufferedReader BR=new BufferedReader(new InputStreamReader(System.in)); x=BR.readLine(); n=BR.readLine(); a=Double.parseDouble(x); b=Double.parseDouble(n); int R=5; for(i=1,R=5;i { y=R*y*a/(i*1); sum=sum+y; } System.out.println("Binomial="+sum); } } To download the program click here:Binomial.java

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP