Test it yourself.
It's not complicated: put that code in a method that accepts three parameters p, q, and r, and add code to print the parameters to it.
Then set up a set of nested loops to check it:
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
for (int k = 0; k < 3; k++)
{
check(i, j, k);
}
}
}
Look at the outputs, and see which set is failing a test.
Hint: look at values where p is greater than both q and r, which are identical.