https://puu.sh/sir6J/025a374638.png
Written code is below. for some reason my bubble sorting code isnt working idk why. ive been looking over it but it just wont print out correctly.
This is how it looks with my code when i try to sort it.
https://puu.sh/sirdw/5f66cdab5f.png
My goal is to sort each row from lowest to highest. like the first row is correct but not the others
double temp;
for (int zz=1; zz<50; zz++)
{
for (int index = 0; index < 4 ; index++)
{
if (Data[zz][index]>Data[zz][index+1])
{
temp=Data[zz][index];
Data[zz][index]=Data[zz][index+1];
Data[zz][index+1]=temp;
}
}
}
Written code is below. for some reason my bubble sorting code isnt working idk why. ive been looking over it but it just wont print out correctly.
This is how it looks with my code when i try to sort it.
https://puu.sh/sirdw/5f66cdab5f.png
My goal is to sort each row from lowest to highest. like the first row is correct but not the others
double temp;
for (int zz=1; zz<50; zz++)
{
for (int index = 0; index < 4 ; index++)
{
if (Data[zz][index]>Data[zz][index+1])
{
temp=Data[zz][index];
Data[zz][index]=Data[zz][index+1];
Data[zz][index+1]=temp;
}
}
}


