Modular exponentiaton

#include
using namespace std;
int pow_mod(int a,int b,int c)
{
int res=1;a=a%c;
while(b>0)
{
if(b&1)
res=(resa)%c;
a=(a
a)%c;

    b=b>>1;

}
return (res+c)%c;
}
int main() {
int a,b,c;
cin>>a>>b>>c;
cout<<pow_mod(a,b,c);
return 0;
}

output-
TESTCASE # 1 : correct (Time: 0 s)
TESTCASE # 2 : correct (Time: 0 s)
TESTCASE # 3 : correct (Time: 0 s)
TESTCASE # 4 : correct (Time: 0 s)
TESTCASE # 5 : correct (Time: 0 s)
TESTCASE # 6 : correct (Time: 0 s)
TESTCASE # 7 : correct (Time: 0 s)
TESTCASE # 8 : correct (Time: 0 s)
TESTCASE # 9 : correct (Time: 0 s)
TESTCASE # 10 : wrong-answer (Time: 0 s)