Advertisement
DaniDori

Untitled

Apr 26th, 2020
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. int scanAdj(int n, vector<vector<int>> arr) {
  2.     bool x;
  3.     cout << endl << "Enter data about people:" << endl;
  4.     for (int i = 0; i < n; i++) {
  5.         for (int j = 0; j < n; j++) {
  6.             if (!(cin >> x)) {
  7.                 cout << "wrong data.";
  8.                 return Bad;
  9.             }
  10.             if (x) {
  11.                 arr[i].push_back(j);
  12.             }
  13.         }
  14.     }
  15.     return Ok;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement