Why is this not working?
Modular Exponentiation
@tanyaa.sood
You need to intialize ans with 1 and ans=((a%m)(a%m))%m; would change to ans=((ans%m)(a%m))%m;
Why is this not working?
@tanyaa.sood
You need to intialize ans with 1 and ans=((a%m)(a%m))%m; would change to ans=((ans%m)(a%m))%m;