GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — java-basics/java-programs/SquarerootOfNumber.java at master · learning-zone/java-basics Expand file tree/ Copy pathSquarerootOfNumber.javaMore file actions 18 lines (15 loc) · 364 Bytes / Copy pathSquarerootOfNumber.javaFile metadata and controls18 lines (15 loc) · 364 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 package misc; public class SquarerootOfNumber { public static double sqrt(int number) { double t; double squareRoot = number / 2; do { t = squareRoot; squareRoot = (t + (number / t)) / 2; } while ((t - squareRoot) != 0); return squareRoot; } public static void main(String[] args) { System.out.println("Square root of 2: " + sqrt(2)); } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |