Advertisement
Saleh127

graph assnmnt

Mar 23rd, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int a[100][100],b,c,d,e,f,i,j,k,l;
  6. char x,y;
  7. for(i=1;i<=6;i++)
  8. {
  9. for(j=1;j<=6;j++)
  10. {
  11. scanf("%d",&a[i][j]);
  12. }
  13. }
  14. for(i=1;i<=6;i++)
  15. {
  16. for(j=1;j<=6;j++)
  17. {
  18. if(a[i][j]==1)
  19. {
  20. if(i==1) x='A';
  21. else if(i==2) x='B';
  22. else if(i==3) x='C';
  23. else if(i==4) x='D';
  24. else if(i==5) x='E';
  25. else if(i==6) x='F';
  26. if(j==1) y='A';
  27. else if(j==2) y='B';
  28. else if(j==3) y='C';
  29. else if(j==4) y='D';
  30. else if(j==5) y='E';
  31. else if(j==6) y='F';
  32. printf("%c->%c\n",x,y);
  33. }
  34. }
  35. }
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement