Why is the code giving the wrong answer for 75% test cases?

//Calculate (a*b)%c

#include
using namespace std;

int main() {
long int a,b,c;
cin>>a>>b>>c;
long int ans=((a%c)*(b%c))%c;
cout<<ans;
return 0;
}

you need to calculate (a^b)%c , not (a*b)%c