bool IsArProgr(int A, int B, int C)
{
if (A < B || B <= 0 || C <= 0) return false;
if (A == B) return true;
if ((A - B) % C != 0) return false;
int position = (A - B) / C + 1;
if (position > 0) return true;
return false;
}
|