Now whats error in this
please provide its code
In this you are calculating a^b by power function but when a and b are very large then the output goes out of the limit of int and hence you get wrong answer.
(ab)%c=((a%c)(b%c))%c
This property you have to use to calculate the value.
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.