Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Cuz nothing called array_spice it's array_splice()...
It shouldn't work with floats. If floats ar needed return must be changed from int to float
This comment is hidden because it contains spoiler information about the solution
This won't work with floats..
Thx man :)
I just checked and yes, this seems to be the problem: C++ code and PHP code work differently, because
/
is integer division in C++, and not in PHP. After replacing/
withintdiv
in PHP, and making it equivalent with the C++ one, it worked.It's not a kata issue, the C++ and PHP code given above are not the same.
I deleted the duplicate issue.
If someone is certain that these two codes are not equivalent and PHP is correctly rejected, please mark this issue as resoved (i cannot check exactly now).
You already raised one issue, so could you please remove the other one? These 2 code snippets don't look the same.
/
operator returns float values in PHP, whereas it does integer division in C++.These two pieces of code are not the same. In C++, you have a global variable, which you do not have in PHP. Additionally I think (I can;t remember exactly tho) that in PHP the
/
works differently than in C++.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Without code formatting I cannot read the code, so I am not sure if both C++ and PHP code are the same. You'd need to post the code once again, using proper formatting this time, to make it readable (see the link I posted in my previous message).
Why the same code dosen't work in PHP ?
But what exactly is the issue here? Is there a problem that something passed, but should not? Or that something did not pass, but should?
Please remember to use code blocks when posting code.
This comment is hidden because it contains spoiler information about the solution
Loading more items...