Ferix

RSOJava#14

Dec 2nd, 2020
417
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.lang.Math;
  2. public class MyClass {
  3.     public static void main(String args[]) {
  4.         double y = 0;
  5.         for(double x=1; x < 21; x++){
  6.             System.out.println("Sum " + y + " + " + Math.sqrt(x));
  7.             y = y + Math.sqrt(x);
  8.             System.out.println(y);
  9.         }
  10.     }
  11. }
RAW Paste Data