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