Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void stvoriGraf(vector<int> adj[], int V)
- {
- for (int i = 0; i < V; i++)
- {
- for (int j = 0; j < V; j++)
- {
- int create_edge = rand() % 150;
- if (create_edge == 1 && i != j)
- {
- adj[i].push_back(j);
- adj[j].push_back(i);
- cout << i << " POVEZAN " << j << endl;
- }
- else{
- if (i != j) {
- cout << i << " nije povezan sa " << j << endl;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement