Hey, I'm really new to coding. This is my first semester taking C++ and I need help translating this for loop into a while loop or a do while loop.
for (int i=0; i<22581; i=i+1)
if (sunX[i]>sunX[i+1])
{
max[i/2] = sunX[i];
min[i/2] = sunX[i+1];
} //end of for loop
else
{
max[i/2] = sunX[i+1];
min[i/2] = sunX[i];
}