Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public static int[] StupneVrcholu(int[,] graf)
  2. {
  3. int N = graf.GetLength(0);
  4. int[] stupenVrcholu = new int[N];
  5.  
  6. for (int i = 0; i < N; i++)
  7. {
  8. stupenVrcholu[i] = 0;
  9. for (int j = 0; j < N; j++)
  10. if (graf[i, j] != int.MaxValue)
  11. stupenVrcholu[i] += graf[i, j];
  12. }
  13.  
  14. return stupenVrcholu;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement