Modular exponention

#include

using namespace std;
//#define l long long

int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a>=1 && a<= 100000 && b>=1 && b<= 100000 && c>=1 && c<= 100000 )
{
int d= ((a%c)*(b%c))%c;
cout<<d;
}
return 0;
}
code is this it is not getting submitted…kindly check

Hi @Madhavendra-Gupta-2240591552663161

You have to calculate (a^b)%c but your code is calculating (a*b)%c which is not same.

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.