#include <iostream>
#include <string>
#include <cstdlib>
usingnamespace std;
int main()
{
int a=0,b=0,c=0,d=0,e=0,f=0,ana=0,ste=0;
string j,k,l,m,n,o;
cin >> j >> k >> l >> m >> n >> o;
for (int i=0;i<3;i++)
{
a+=j[i]-'0';
b+=k[i]-'0';
c+=l[i]-'0';
d+=m[i]-'0';
e+=n[i]-'0';
f+=o[i]-'0';
}
atoi(j.c_str());
atoi(k.c_str());
atoi(l.c_str());
atoi(m.c_str());
atoi(n.c_str());
atoi(o.c_str());
if (j%a==0)
{
ana=ana+2;
ste--;
}
if (k%b==0)
{
ste=ste+2;
ana--;
}
if (l%c==0)
{
ana=ana+2;
ste--;
}
if (m%d==0)
{
ste=ste+2;
ana--;
}
if (n%e==0)
{
ana=ana+2;
ste--;
}
if (o%f==0)
{
ste=ste+2;
ana--;
}
}
This is the code I made for a simple exercise. What doesn't work here is the atoi function. It says no match for operator %. Please help ! Thanks in advance :D