commit ac8bd4c5d7cf919653fe3d2f3759415eeb21d68e Author: Elias F. Date: Mon Nov 17 13:49:43 2025 +0100 initial commit diff --git a/index.php b/index.php new file mode 100644 index 0000000..6128a39 --- /dev/null +++ b/index.php @@ -0,0 +1,79 @@ + + + + + + Primzahlen + + + +

Primzahlenberechnung

+
+
+
+ + +
+ + Primzahlen von " . htmlspecialchars($_POST["input"], ENT_QUOTES, 'UTF-8') . " sind:"; + + foreach($primeNumbers as $number) { + echo "" . $number . "
"; + } + } + + function isPrime($i) { + if ($i <= 1) return false; + if ($i <= 3) return true; + if ($i % 2 == 0) return false; + + for ($j = 3; $j * $j <= $i; $j += 2) { + if ($i % $j == 0) { + return false; + } + } + + return true; + } + ?> +
+ +
+

Logarithmische Funktion (n = 1..100)

+
+ 0 ? str_repeat('*', $starsCount) : '-'; + + echo sprintf("%3d: ln=%6s %s
", $n, $lnFormatted, $stars); + } + ?> +
+
+
+ + \ No newline at end of file