b = b%m;
for(int i = 0; i < m; i++)
{
if((i*a) % m == b)
**add i to solution set**
}
I am trying to create this program for my computer science class. I am not a computer science major and all I could come up with was this :
#include
using namespace std;
int main()
{
int a, b, n, x;
int m = (n / b);
cout << " enter a value for a: " << endl;
cin >> a;
cout << "Enter value for b: " << endl;
cin >> b;
cout << "Enter value for m: " << endl;
cin >> m;
n = m / b;
x = n * b;
return x;
}