Advertisement
Guest User

main.c

a guest
Jan 23rd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include "VenturaLibrary.h"
  5.  
  6. int main(int argc, char **argv)
  7. {
  8. char instruccion[20];
  9. int tiempo = 0;
  10. char opcion = '0';
  11. Ins *head = NULL;
  12.  
  13. //aquí pongan la llamada a display para que se vean las instrucciones
  14. do {
  15. scanf("%c",&opcion);
  16.  
  17. if(opcion == 'q'){
  18. printf("Have a nice day");
  19. break;
  20. }
  21.  
  22. switch(opcion)
  23. {
  24. case '1':
  25. printf("Capturar nombre de la instrucción:"); scanf("%s", instruccion);
  26. printf("Capturar tiempo de la instrucción:"); scanf("%d", &tiempo);
  27. int pal=disboy(instruccion,tiempo);
  28. if(pal == 1){
  29. head = anadirInstruccion(head,instruccion,tiempo);}break;
  30. case '2': recorrer(head);break;
  31. case '3': head = mandarInstrucciones(head);
  32.  
  33. }
  34. }while (1);
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement