Hello, I am working on this problem with no luck. I have a list of data that has been put into an array like so
a[0] = 2
a[1] = 3
a[2] = 6
a[3] = 8
a[4] = 10
a[5] = 12
The numbers correspond to employees id's who participated in a fundraiser. I have 20 employees in total. Therefore I am trying to check the array to see out of the 20 employees who did not participate. In this case it would be 1,4,5,7,9,11,13,14,15,16,17,18,19,20.
I was trying something like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
ins.open(in_file);
int i =0;
while (!ins.eof())
{
ins >> agent[i] >> sales[i] >> value[i];
i++;
}
for (int r = 0; r<i; r++)
{
for (int x=1; x<20; x++)
{
cout << x << endl;
}
}
|
but it prints out x every time it checks so I get like 20 x i amount of numbers.... help ?
thanks