My Prog Adventures

By Mymedu

36 1 0

I am also a programmer. I have been intending to post some of my scripts on here. I can teach math and progra... More

factsofnum.java
bank.java
translator.js
userprofiles.js
snakecharm.java
snakecharmer.java
selentest.java
loadeditfile.js
calendar.js
calendarappmod.js
fractplot.java
csvpredtrain.py
slfchkalg.java
square enix christmas in html
New invention posting #1: 2 jet engine improvements

powersum.java

2 0 0
By Mymedu

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;}}

Continue Reading

You'll Also Like

19.5K 1.8K 93
ALEX The name is enough to shiver down anyone. He is the defination of cruelty and known for his torture. The king of Mafia. He is cold, cruel, domin...
56K 7.3K 28
Story of a surgeon Dr. Zulaid Afandi and a medical student Dr. Inara Ibrahim. Age gap Enemies to lovers Grumpyร—sunshine Arranged marriage "What did...
1.7M 17.3K 3
*Wattys 2018 Winner / Hidden Gems* CREATE YOUR OWN MR. RIGHT Weeks before Valentine's, seventeen-year-old Kate Lapuz goes through her first ever br...
714K 47.2K 39
[Highest ranking: #1 in Spiritual on 15/8/18] โ€ขโ€ขโ€ข โ€ข In which a girl saved a boy's life in the most unexpected of circumstances โ€ข She drank water. He...