From 6200a1a235a547ad5f90a6a7e5b66217068124e3 Mon Sep 17 00:00:00 2001 From: gnieark Date: Sat, 14 Nov 2015 23:14:13 +0100 Subject: [PATCH] . --- euler5-bis.php | 21 +++++++++++++++++++++ euler5.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 euler5-bis.php create mode 100644 euler5.php diff --git a/euler5-bis.php b/euler5-bis.php new file mode 100644 index 0000000..41b4a29 --- /dev/null +++ b/euler5-bis.php @@ -0,0 +1,21 @@ +1;$j--){ + if(fmod($i,$j)<>0){ + $divisible=false; + break; + } + } +} +echo $i; \ No newline at end of file diff --git a/euler5.php b/euler5.php new file mode 100644 index 0000000..0f9aa94 --- /dev/null +++ b/euler5.php @@ -0,0 +1,28 @@ +0;$i+=-20){ + //tester si i est divisible + $divisible=true; + for($j=19;$j>0;$j--){ + if(fmod($i,$j)<>0){ + $divisible=false; + break; + } + } + if($divisible){ + $smaller=$i; + echo $i."\n"; + } + +} +echo $smaller; \ No newline at end of file