Source code of determining the summation of ax series

Monday, March 16, 2009

import java.io.*; import java.lang.Math; class AxSeries { public static void main(String args[])throws IOException { String c,d,e; double a,b; double C; BufferedReader BR=new BufferedReader(new InputStreamReader(System.in)); c=BR.readLine(); d=BR.readLine(); e=BR.readLine(); a=Double.parseDouble(c); b=Double.parseDouble(d); C=Double.parseDouble(e); double sum=1; double f=1; for(double i=1;i { f=(f*b*Math.log(C))/(i*1); sum=sum+f; } System.out.printf("%f\n",sum); } }

0 comments:

Visitors

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

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP