User Profile
Collapse
-
That way in case of a larger size matrix (say 100) i will have to keep on punching in values and the coding would be lengthy and repetitive. This way i can substitute any value for rows and cols and get my matrix already filled with random entries. Now i just have to limit the appearance of the entries according to the order of the matrix. Once i have the matrix as desired then i can start using mathematical operations in them. Just an idea for a... -
NewCplusplus started a topic Limiting duplicate entries in a matrix. How to make it look like a sudoku?in CLimiting duplicate entries in a matrix. How to make it look like a sudoku?
Hello. I have made a square matrix of order nxn with random values in it. The entries are 1 to n appearing randomly as desired. Now i would like to limit all entries to appear strictly n times. for e.g. in the code below the output is a 9x9 matrix with entries 1 to 9. I want every number to appear only 9 times in the matrix to make it look like a sudoku. So how to do that?
Code:#include <iostream> #include <cstdlib>
No activity results to display
Show More
Leave a comment: