diff options
Diffstat (limited to 'usth/ICT3.2/prac/4/5.php')
-rw-r--r-- | usth/ICT3.2/prac/4/5.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usth/ICT3.2/prac/4/5.php b/usth/ICT3.2/prac/4/5.php new file mode 100644 index 0000000..d148f5a --- /dev/null +++ b/usth/ICT3.2/prac/4/5.php @@ -0,0 +1,8 @@ +<?php + +function is_prime(int $n): bool { + for ($i = 2; $i * $i <= $n; $i++) + if ($n % $i == 0) + return false; + return true; +} |