Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modificada login screen del main #25

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/Debug/tmphotel.exe
Binary file not shown.
37 changes: 0 additions & 37 deletions botellas.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ int menuBotellas()
printf("| 4 | Ordenar botellas por ID |\n"); // SELECCION
printf("| 5 | Buscar Marca |\n");
printf("| 6 | Modificar Segun usuario |\n");
printf("| 7 | Reciclar botellas retornables |\n");
printf("| 0 | Salir |\n");
printf("==========================================\n");
printf("Su decision: ");
Expand Down Expand Up @@ -66,14 +65,6 @@ int menuBotellas()
scanf("%d", &idTemporal);
ModificarSegunUsuario(Arch, idTemporal);
break;

case 7:
ReciclarBotellas(Arch);

break;



case 0:
printf("Opción inválida. Por favor, ingrese nuevamente.\n");
break;
Expand Down Expand Up @@ -403,31 +394,3 @@ void ModificarSegunUsuario(char nombre[], int id)
}
}

void ReciclarBotellas(char nombre[]) {
FILE* Archi;
Archi = fopen(nombre, "r+b");
int idRetorn;
botellita Temp;
Pila Recicable;
inicpila(&Recicable);

if (Archi != NULL) {
while (fread(&Temp, sizeof(botellita), 1, Archi) > 0) {
printf("Ingrese el id de la botella que desea retornar (0 para salir):\n");
scanf("%d", &idRetorn);

if (idRetorn == 0) {
break; // Salir del bucle si se ingresa 0
}

if (Temp.id == idRetorn && Temp.retornable == 0) {
apilar(&Recicable, Temp.id);
}
}

mostrar(&Recicable);
fclose(Archi);
}
}


25 changes: 13 additions & 12 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ void inicioSesion()

const char *titulo[] =
{
" ____ _____ ____ _____ ___ ___ _ _ ",
" / ___| ____/ ___|_ _|_ _/ _ \\| \\ | | ",
" | | _| _| \\___ \\ | | | | | | | \\| | ",
" | |_| | |___ ___) || | | | |_| | |\\ | ",
" \\____|_____|____/ |_| |___\\___/|_| \\_|_ _____ _ ",
" | | | |/ _ \\_ _| ____| | ",
" | |_| | | | || | | _| | | ",
" | _ | |_| || | | |___| |___ ",
" |_| |_|\\___/ |_| |_____|_____|",
" "
" ____ _____ _ __ __ ______________________ ",
" / ___|_ _|/ \\ \\ / // / / / / / / / / / / ",
" \\___ \\ | | / _ \\\\ V // / / / / / / / / / / ",
" ___) || |/ ___ \\| |/ / / / / / / / / / / ",
" |____/_|_/_/___\\_\\_/_/_/_/_/_/_/_/_/_/_/___ _ __",
" / / / / / / / / /_ _| _ \\ / \\ / ___| |/ /",
" / / / / / / / / / | | | |_) | / _ \\| | | ' / ",
" / / / / / / / / / | | | _ < / ___ \\ |___| . \\ ",
" /_/_/_/_/_/_/_/_/ |_| |_| \\_\\/_/ \\_\\____|_|\\_\\",
" "
};

int numLineas = sizeof(titulo) / sizeof(titulo[0]);
Expand All @@ -79,8 +79,8 @@ void inicioSesion()
{

// Calcula el valor de azul y violeta en función de la posición j
int azul = 255 - j * (255 / strlen(titulo[i]));
int violeta = j * (255 / strlen(titulo[i]));
int azul = 255 - j * (255 / (strlen(titulo[i]) - 1));
int violeta = j * (255 / (strlen(titulo[i]) - 1));

// Establece el color utilizando códigos de escape ANSI
printf("\033[48;2;%d;0;%dm%c\033[0m", violeta, azul, titulo[i][j]);
Expand Down Expand Up @@ -127,6 +127,7 @@ void inicioSesion()
}



void limpiarPantalla()
{
#ifdef _WIN32
Expand Down
Binary file modified obj/Debug/botellas.o
Binary file not shown.
Binary file modified obj/Debug/main.o
Binary file not shown.
2 changes: 1 addition & 1 deletion reservas.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int menuReservas()
printf("| 12 | Modificar cliente |\n");
printf("| 13 | Filtrar por nombre |\n"); // INSERCION
printf("| 14 | Filtrar por edad |\n"); // SELECCION
printf("| 0 | Cerrar sesion |\n");
printf("| 0 | Volver |\n");
printf("==========================================\n");
printf("Su decision: ");
scanf("%i", &op);
Expand Down
2 changes: 1 addition & 1 deletion tmphotel.depend
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
<string.h>
"tiempo.h"

1687401089 source:c:\storage\docs\learning-aprendizaje\aa tecnología\docs\utn\tup\cursada\primer cuatrimestre\prog-laboratorio\trabajo final\gestion-hotel\main.c
1687403957 source:c:\storage\docs\learning-aprendizaje\aa tecnología\docs\utn\tup\cursada\primer cuatrimestre\prog-laboratorio\trabajo final\gestion-hotel\main.c
<stdio.h>
<stdlib.h>
"tiempo.h"
Expand Down