I am new to programming, but I am trying to create two arrays, arrX and arrY. Then use scanf to insert intialnum amount of elements into each array. That is the easy part.
Where I am having trouble is when I try to pull the first element in each array [0] and send it into a function (if it is negative it is compared, converted to unsigned, and sent to the respective function). Increment to the next element, and then jump to the next array and do the same thing.
...
for(c=0;c < InitialNum;c++)
{
if(arrX[I] < 0) ////if array element value is negative...
{
m = ~(arrX[I]);//convert to unsigned
m == m+1;
ccwX(m);
I++;//increment to next element????
}
else
{
n = (arrX[I]);
cwX(n);
}
I++;
if(arrY[K] < 0)
{
o = ~arrY[K];
o = o+1;
ccwY(o);
}
else
{
p = (arrY[K]);
cwY(p);
}
K++;
}
puts("Process completed\n\r");
}