Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 11, 2022 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/469e9cb00637e60741a2b7acfd62290e to your computer and use it in GitHub Desktop.
Save parzibyte/469e9cb00637e60741a2b7acfd62290e to your computer and use it in GitHub Desktop.
void menuSacarVehiculo(struct LugarEstacionamiento lugares[CANTIDAD_CARROS + CANTIDAD_MOTOS])
{
int lugar = 0;
while (1)
{
printf("Ingrese el lugar: ");
scanf("%d", &lugar);
if (lugar > 0 && lugar <= CANTIDAD_CARROS + CANTIDAD_MOTOS)
{
if (lugares[lugar - 1].estado == DESOCUPADO)
{
printf("No hay vehiculo estacionado en este lugar\n");
}
else
{
lugar = lugar - 1;
break;
}
}
else
{
printf("Numero no valido\n");
}
}
marcarSalidaVehiculo(lugares, lugar);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment