Guest User

Untitled

a guest
Jan 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.57 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <conio.h>
  3. # include <stdlib.h>
  4. # include <windows.h>
  5. # define dias 7
  6. # define max 30
  7.  
  8. void textcolor(int newcolor)
  9. {
  10.    CONSOLE_SCREEN_BUFFER_INFO csbi;
  11.  
  12.    GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
  13.    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
  14.       (csbi.wAttributes & 0xf0) | newcolor);
  15. }
  16.  
  17. void capturar()
  18. {
  19.    
  20. }
  21.  
  22. int main(void)
  23. {
  24.     int mathrs[max][dias];
  25.     float matprom[dias];
  26.     char *matnom[max][max],nom[20];
  27.     int opc,rap=1,cant,edit;
  28.     do{
  29.     textcolor(3);
  30.     printf("\n\t\t**Opciones**\n\n");
  31.     textcolor(5);
  32.     printf("1).- Capturar\n2).- Mostrar\n3).- Eliminar\n4).- Salir\n>> ");
  33.     scanf("%i",&opc);
  34.     switch(opc)
  35.     {
  36.         case 1 : system("cls");
  37.                  system("color f1");
  38.                  printf("Cuantos trabajadores son:\n");
  39.                  scanf("%i",&cant);
  40.                  printf("Dame su(s) nombre(s):\n");
  41.                  capturar(mathrs, matnom, cant);
  42.         break;
  43.         case 2 : system("cls");
  44.                  system("color f1");
  45.                  //mostrar(mathrs, matnom, cant, matprom);
  46.         break;
  47.         case 3 : system("cls");
  48.                  system("color f1");
  49.                  printf("Dame el nombre del trabajador:\n>> ");
  50.                  scanf("%s",&nom);
  51.                  //eliminar(mathrs,matnom, cant, nom);
  52.         break;
  53.         case 4 : system("cls");
  54.                  rap = 0;
  55.         break;
  56.         default : printf("\nOpcion no valida:\n");
  57.     }
  58.     }while(rap==1);
  59.     return (0);
  60. }
Add Comment
Please, Sign In to add comment