Advertisement
Arael_Alvarez_Curiel

Tarea 3 MR1001 Main

Jan 23rd, 2017
99
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.  
  7. int main(int argc, char **argv)
  8. {
  9.     char instruccion[20];
  10.     int tiempo = 0;
  11.     char opcion = '0';
  12.     Ins *head = NULL;
  13.  
  14.     //aquí pongan la llamada a display para que se vean las instrucciones
  15.     do {
  16.         scanf("%c",&opcion);
  17.  
  18.         if(opcion == 'q'){
  19.             printf("Have a nice day");
  20.             break;
  21.         }
  22.  
  23.         switch(opcion)
  24.         {
  25.             case '1':
  26.             printf("Capturar nombre de la instruccion:");   scanf("%s", instruccion);
  27.             printf("Capturar tiempo de la instruccion:");   scanf("%d", &tiempo);
  28.             head = anadirInstruccion(head,instruccion,tiempo);break;
  29.             case '2': recorrer(head);break;
  30.             case '3': head = mandarInstrucciones(head);
  31.  
  32.         }
  33.     }while (1);
  34.  
  35.    return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement