import java.util.*;
public class powersum {
public static void main(String[] args) {
//A reference to the video "A problem with the integral" where they apply physical parameters to traditional calculus to make the results more realistic. reference to dinukasaminda.
//i also believe that math should be approached from a physical perspective rather than an arbitrary one. also logic should be learned since middle school.
Scanner scan=new Scanner(System.in);
//System.out.println("Enter the java equivalent of the formula");String y=scan.nextLine();
System.out.println("Enter the double for lower bound");double sum=scan.nextDouble();
System.out.println("Enter the double for upper bound");double n=scan.nextDouble();
System.out.println("Enter the double for x");double x=scan.nextInt();
System.out.println("Enter the double for the index i (up to 6.25(10^37))");double i=scan.nextDouble();
System.out.print("."+System.currentTimeMillis());
for(double s=0;s<n;s++){double an=an(x,s);sum+=an*(n-sum)/i;
System.out.println("an:"+an);
System.out.println("sum of "+s+" terms: "+sum);
System.out.println("sum:"+sum);
System.out.print("."+System.currentTimeMillis());}}
//String xs=String.valueOf(x);String ss=String.valueOf(s);
public static double an(double x,double s){
return //"Enter relevant function here"
x+s;}}
YOU ARE READING
My Prog Adventures
SpiritualI am also a programmer. I have been intending to post some of my scripts on here. I can teach math and programming, please reach out to me in conversations, my messages on here isnt working.