Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i = 1; i <= n; i++)
- {
- for (j = 1; j <= n; j++)
- {
- if(matrix[i][j] == 0)
- {
- if(j != n)
- {
- if(matrix[i][j+1] == 0)
- edge = edge + 1;
- }
- }
- if(matrix[i][j] == 0)
- {
- if(i != n)
- {
- if(matrix[i+1][j] == 0)
- edge = edge + 1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment