Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.98 KB | None | 0 0
  1. case:
  2. if(emptyP(listaprioridad)==1){
  3.             printf("Lista Vacia\n");
  4.             system("PAUSE");
  5.         } else{
  6.         resetP(&listaprioridad);
  7.         arr = (datos*)malloc(sizeof(datos)*i);
  8.         Mastiempo(listaprioridad,&aux2,&arr);
  9.  
  10.  
  11.         for(i=0;i<*aux2; i++){
  12.             printf("%s\n",arr[i].nomb);
  13.         }
  14.         system("PAUSE");
  15.         }
  16.         break;
  17.  
  18.  
  19.  
  20.  
  21. funcion
  22. //* Quien espero mas tiempo RECURSIVA*//
  23. void Mastiempo(listaP P,int *aux2,datos **arr){
  24. if(oosP(P)==1){
  25.     return;
  26. }
  27. else
  28.     **arr = copyP(P);
  29.     forwardP(&P);
  30.     if(retorna_resta_horasmin(**arr) > retorna_resta_horasmin(copyP(P))){
  31.         forwardP(&P);
  32.         *aux2 = *aux2 + 1;
  33.  
  34.     }
  35.     else if(retorna_resta_horasmin(**arr)== retorna_resta_horasmin(copyP(P))){
  36.         arr = arr + sizeof(datos);
  37.         **arr=copyP(P);
  38.         *aux2 = *aux2 + 1;
  39.  
  40.     } else if(retorna_resta_horasmin(**arr)< retorna_resta_horasmin(copyP(P))){
  41.     **arr= copyP(P);
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement