• + 1 comment

    It was easy to read your logic and it's correct. A minor improvement would be to reduce the check in else if(mb>=ma && mb>=mc), because before reaching here you already know that ma is not the maximum value. So, it's enough to check if mb is greater than mc like so: else if (mb >= mc).