about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/1/FunctionGrowth.java
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT2.2/labwork/1/FunctionGrowth.java')
-rw-r--r--usth/ICT2.2/labwork/1/FunctionGrowth.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/usth/ICT2.2/labwork/1/FunctionGrowth.java b/usth/ICT2.2/labwork/1/FunctionGrowth.java
new file mode 100644
index 0000000..e1bebfa
--- /dev/null
+++ b/usth/ICT2.2/labwork/1/FunctionGrowth.java
@@ -0,0 +1,10 @@
+class FunctionGrowth
+{
+  public static void main(String... args)
+  {
+    System.out.println("ln n\tn\tn ln n\tn^2\tn^3\t2^n");
+    for (long n = 16; n < 3005; n <<= 1)
+      System.out.printf("%g\t%d\t%g\t%d\t%d\t%g\n", Math.log(n), n,
+                        n * Math.log(n), n*n, n*n*n, Math.pow(2, n));
+  }
+}