liz28

Untitled

Jan 23rd, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.75 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.             head = anadirInstruccion(head,instruccion,tiempo);break;
  28.             case '2': recorrer(head);break;
  29.             case '3': head = mandarInstrucciones(head);
  30.  
  31.         }
  32.     }while (1);
  33.  
  34.    return 0;
  35. }
Add Comment
Please, Sign In to add comment