User Profile

Collapse

Profile Sidebar

Collapse
NewCplusplus
NewCplusplus
Last Activity: Oct 6 '16, 01:21 AM
Joined: Oct 2 '16
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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...
    See more | Go to post

    Leave a comment:


  • Limiting 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>
    ...
    See more | Go to post
No activity results to display
Show More
Working...