What is wrong with my code?

i want to know that what is wrong with my code and also i am not able to understand the solution to this problem.

@alankrit.agr99 Please save your code at ide.codingblocks.com and share its link

@alankrit.agr99 For given values of a,b and c, you have to print (a^b)mod c. The constraints given are 1<=a,b,c<=100000. So (a^b) can reach a very large value which cannot be handled by the datatype(imagine 10000^999…this number will be huge). You have to handle those cases when a^b reaches a very large value. For this you have to use the property of MOD as taught in lectures.


Refer this code and you will understand.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.