Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. computeValues(array, row, column)
  2. FOR count = 1 - 9
  3. IF !containsNumber(array, count, row, column)
  4. PRINT count
  5.  
  6. containsNumber(array, number, row, column)
  7. FOR count 0-8
  8. IF array[row][count] is number
  9. RETURN true
  10. FOR count 0-8
  11. IF array[count][column] is number
  12. RETURN true
  13. FOR count 0-2
  14. IF array[row / 3][column / 3 + count] is number
  15. RETURN true
  16. FOR count 0-2
  17. IF array[row / 3 + 1][column / 3 + count] is number
  18. RETURN true
  19. FOR count 0-2
  20. IF array[row / 3 + 2][column / 3 + count] is number
  21. RETURN true
  22. RETURN false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement