From 67393f42f41ab92219deb549f711121c4dab845b Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sun, 15 Dec 2019 10:34:58 +0700 Subject: [usth/ICT2.2] Object Oriented Programming --- usth/ICT2.2/labwork/1/FunctionGrowth.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 usth/ICT2.2/labwork/1/FunctionGrowth.java (limited to 'usth/ICT2.2/labwork/1/FunctionGrowth.java') 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)); + } +} -- cgit 1.4.1