I doubt anyone's going to debug your broken code for you. At least tell us where you suspect the problem is, or what you expected as output and what actually came out.
Everything works fine, the only issue is with the multiplication function.
examples go a long long way.
Can you please give us some example input and what output it's actually producing?
I tried to run the code and check myself, but it doesn't compile as-is (MAX, BETA, GAMMA, etc are undefined)