Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include "pila.h"
- int main()
- {
- Pila DADA, MENOR, AUXDADA, AUXMENOR;
- inicpila (&DADA);
- inicpila (&MENOR);
- inicpila (&AUXDADA);
- inicpila (&AUXMENOR);
- CargarPila (&DADA);
- mostrar (&DADA)
- return 0;
- }
- void CargarPila (Pila* a)
- {
- char OP='s';
- while (OP=='s')
- {
- // para ponerle nombre a la pila en el printf necesito strings //
- printf("INGRESE UN VALOR A LA PILA\n");
- leer (a);
- printf("\n DESEA INGRESAR OTRO? s/n\n");
- fflush(stdin);
- scanf("%c",&OP);
- }
- }
- /* 1. Hacer una función que permita ingresar varios elementos a una Pila, tantos como quiera el usuario. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement