Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int Negativos(int[,] mat)
- {
- int linhas = mat.GetLength(0);
- int colunas = mat.GetLength(1);
- int numNegativo = 0;
- for (int i = 0 ; i < linhas ; i++)
- {
- for (int c = 0 ; c < colunas; c++)
- {
- if (mat[i,c] < 0)
- {
- numNegativo++;
- }
- }
- }
- return numNegativo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement