Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.Math;
- public class MyClass {
- public static void main(String args[]) {
- double y = 0;
- for(double x=1; x < 21; x++){
- System.out.println("Sum " + y + " + " + Math.sqrt(x));
- y = y + Math.sqrt(x);
- System.out.println(y);
- }
- }
- }
RAW Paste Data