Documentos de Académico
Documentos de Profesional
Documentos de Cultura
SOLUCIÓN (C++)
int main()
{
nodo *frente=NULL;
nodo *fin=NULL;
nodo *frenteaux=NULL;
nodo *finaux=NULL;
int dato,x,k;
//Imprime la cola
cout<<"\nLa cola es: ";
while(frente!=NULL)
{ sacarcola(frente,fin,dato);
cout<<dato<<",";
}
return 0;
}
SOLUCIÓN (C++)
int main()
{ nodo *frente=NULL;
nodo *fin=NULL;
nodo *frenteaux=NULL;
nodo *finaux=NULL;
int dato;
SOLUCIÓN (C++)
int main()
{ nodo *frente=NULL;
nodo *fin=NULL;
int dato,cont;
do{cout<<"Numero : ";
cin>>dato;
if(dato!=0)
agregarcola(frente,fin,dato);
}while(!(dato==0));
if(cont%2==1)
cout<<"Tiene central";
else
cout<<"No tiene central";
return 0;
}