Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include<iostream>
  2. #define VERTEX 5
  3. using namespace std;
  4. void Insertion(){
  5. int Graph[VERTEX][VERTEX];
  6. int Vector[VERTEX][1] = { 1,2,3,4,5};
  7. cout << "ORDER TO ENTER DATA:" << endl;
  8. cout << endl;
  9. cout << "abcde " << endl;
  10. cout << endl;
  11. cout << "a"<<endl;
  12. cout << "b"<<endl;
  13. cout << "c" << endl;
  14. cout << "d" << endl;
  15. cout << "e" << endl;
  16. cout << endl;
  17. cout << "Enter the Directions on the basis of about table of vertices:" << endl;
  18. for (int i = 0; i < VERTEX; i++){
  19. for (int j = 0; j < VERTEX; j++){
  20. cin >>Graph[i][j];
  21. }
  22. }
  23. system("cls");
  24. cout << "Vector Set:" << endl;
  25. for (int i = 0; i < VERTEX; i++){
  26. for (int j = 0; j < 1; j++){
  27. cout << "[" << Vector[i][j] << "]";
  28. }
  29. cout << endl;
  30. }
  31. cout << "Graph Directions:" << endl;
  32. for (int i = 0; i < VERTEX; i++){
  33. for (int j = 0; j < VERTEX; j++){
  34. cout<<"[" <<Graph[i][j]<<"]"<<" ";
  35. }
  36. cout << endl;
  37. }
  38.  
  39. }
  40. int main(){
  41. Insertion();
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement