Skip to content
Snippets Groups Projects
Commit e56a3089 authored by SerZile's avatar SerZile
Browse files

error reporting changed

parent cc9ea02f
No related branches found
No related tags found
No related merge requests found
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
class YinYang class YinYang
{ {
static function provera($a, $b) static function provera($a, $b)
{ {
if ($a > $b){
die("Please check input values, make sure that start and end values are correct.");
}else{
while ($a <= $b) { while ($a <= $b) {
$mod3 = $a % 3 === 0; $mod3 = $a % 3 === 0;
$mod5 = $a % 5 === 0; $mod5 = $a % 5 === 0;
...@@ -20,6 +24,7 @@ class YinYang ...@@ -20,6 +24,7 @@ class YinYang
echo $a; echo $a;
} }
$a++; $a++;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment