Hello! I am trying to iterate a matrix in order to exchange rows and columns element by element. Although the function that exchanges the rows has come out well, i don't seem to figure out how to do the same on columns.The columns switch for a matrix like
1 2 3
1 2 3
1 2 3
if i try to switch column 3 and 2,is:
1 3 2
1 3 2
1 2 3
Any suggestion would be much appreciated. Here...
User Profile
Collapse
-
Iterate a 2D matrix in order to exchange columns and rows using pointers
Last edited by geo20; Jan 19 '14, 03:31 PM. -
C++ Binary Multiplication Program
Hello! I'm writing a program that multiplies binary numbers but i want to avoid using Booth algorithm.I'm trying to stick to the oldfashioned way of writing a line of 0's if the digit of the multiplier is 0 and writing the multiplicant again if the digit digit is 1, and make the sum of all those results to obtain the result of the multiplication. Now, the question is, how should i write the code to tell the program to look at each digit of the multiplier?...
No activity results to display
Show More