Modular expotentation

mam kya code galat hai
#include
#include<math.h>
using namespace std;

int main()
{
long long int a,b,c;
cin>>a;
cin>>b;
cin>>c;
long long int x=pow(a,b);
long long int y=x%c;
cout<<y;
}

hello @YASHMATHURIA123
a^b can be very big number and we dont have any datatype to store that big number so dont use this technique.
we have different technique for (a^b)%c .
pls refer this article ->

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.