c - Sort 2x3 Matrix without using qsort -
My teacher has assigned something that I can not find that Even so far away from me; At present, the program crashes, I think this is because when it goes to the third column, there is nothing in the fourth column I appreciate any and all help! Examples of bubble sort algorithms For One [ja] qsort We have given 2x3 array, and he wants us to sort each row from minimum to maximum. I do not have permission to use
qsort for learning purposes; In my opinion, it is difficult, it is difficult.
[j + 1] , hence it gives an error is.
#include "stdafx.h" # Include & lt; Stdio.h & gt; Int main () {int x [2] [3] = {{2, 3, -1}, {0, -3, 5}}; // 2x3 matrix; 2 rows, 3 columnless sortmainmax (int b [] [3], int nurv, int nuclum); // function prototype sortManMax (X, 2, 3); Return 0; } For Zero Semenax (Int a [] [3], IntraNerv, Int Newcomp.) {For (Int i = 0; I
int i = 0; I & lt; = numRow; I ++ should be
int i = 0; I & lt; NumRow; I ++
(i == 0) & amp;
If (i == 1) if you are doing the same stuff?
(int x = 0; x & lt; n; x ++) {for (int y = 0; y and lt; n-1; y ++) {if (Array [y]> array [y + 1]) {int temp = array [y + 1]; Array [y + 1] = array [y]; Array [y] = temporary; I can get a better option for j = n: i + 1 for swapping = j = 1: n
Comments
Post a Comment