Advertisement
Guest User

menu

a guest
Mar 28th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.22 KB | None | 0 0
  1. void MenuRegistrarUsuario(){
  2.     char nombre[15] ; //Maximo 14 caracteres
  3.     char apellidos [25]; //Apellidos
  4.     char direccion [30];
  5.     char matricula[8]; //Matricula del coche, se entiende matricula española 9999XXX
  6.     char dni [10]; //DNI
  7.     int telefono; //Numero de telefono
  8.     char contrasenia[15]; //Máximo 14 caracteres
  9.  
  10.     printf("Registrar usuario \n");
  11.     fflush(stdout);
  12.     printf("Introduce tu nombre (14 caracteres max.): \n");
  13.     fflush(stdin);
  14.     scanf("%s", &nombre);
  15.  
  16.     fflush(stdout);
  17.     printf("Introduce tus apellidos (24 caracteres max.): \n");
  18.     fflush(stdin);
  19.     scanf("%s", &apellidos);
  20.  
  21.     fflush(stdout);
  22.     printf("Introduce tu direccion (29 caracteres max.): \n");
  23.     fflush(stdin);
  24.     scanf("%s", &direccion);
  25.  
  26.     fflush(stdout);
  27.     printf("Introduce la matricula del coche (7 caracteres max. ej: 9999XXX): \n");
  28.     fflush(stdin);
  29.     scanf("%s", &matricula);
  30.  
  31.     fflush(stdout);
  32.     printf("Introduce tu DNI (9 caracteres max.): \n");
  33.     fflush(stdin);
  34.     scanf("%s", &dni);
  35.  
  36.     fflush(stdout);
  37.     printf("Introduce tu numero de telefono (9 numeros max.): \n");
  38.     fflush(stdin);
  39.     scanf("%d", &telefono);
  40.  
  41.     fflush(stdout);
  42.     printf("Introduce la contrasenia (14 caracteres max.): \n");
  43.     fflush(stdin);
  44.     scanf("%s", &contrasenia);
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement