Interesting problem! You are looking to print out the set of permutations of the three numbers 1,2,3. I did not know where to start initially but soon seen what was needed once I saw your approach. You are on the right lines but the above code will not work.

Rather than just present my solution I would make the following comments;

The for loops listed always start after the first value of the outer loop, but you need to switch to lower values for the later rows, e.g. 3,2,1.

Indeed each variable needs to take on each value at some stage so the latter loops need to run from 1 to 3.

If you just ran the loops with this change you get duplications 1,1,2 or 1,3,1 etc. so you will need to filter out those combinations where there are duplicates and print only side1, side2, and side3 when they are all different!

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.

This is the result of previous question answered :

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...