Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Subvencion(Grafo G)
- {
- tCoste A[G->numVert][G->numVert];
- vertice P[G->numVert][G->numVert];
- int i,j,aux;
- aux=1;
- Floyd(G,A,P);
- printf("Aplicamos Floyd:\n");
- for(i=0;i<G->numVert;i++)
- {
- for(j=0;j<G->numVert;j++)
- printf("%d ",A[i][j]);
- printf("\n");
- }printf("\n");
- ImprimirGrafo(G);
- for(i=0;i<G->numVert;i++)
- {
- for(j=0;j<G->numVert;j++)
- if(A[i][j]==-1)
- aux=0;
- }
- if(aux==1)
- printf("\nEl grafo tiene ciclos. Lo sentimos, no ha conseguido la subvencion\n");
- else
- printf("\n!Enhorabuena, su grafo es aciclico. Nos pondremos en contacto con usted\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment