Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 10, 2022 23:56
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/a0301ffff1be8bc2c61bdb033cb2753f to your computer and use it in GitHub Desktop.
Save parzibyte/a0301ffff1be8bc2c61bdb033cb2753f to your computer and use it in GitHub Desktop.
void limpiarLugares(struct LugarEstacionamiento lugares[CANTIDAD_CARROS + CANTIDAD_MOTOS])
{
int i;
for (i = 0; i < CANTIDAD_CARROS; i++)
{
strcpy(lugares[i].placa, "");
lugares[i].entrada = 0;
lugares[i].estado = DESOCUPADO;
lugares[i].tipo = TIPO_CARRO;
lugares[i].horas = 0;
}
for (i = CANTIDAD_CARROS; i < CANTIDAD_CARROS + CANTIDAD_MOTOS; i++)
{
strcpy(lugares[i].placa, "");
lugares[i].entrada = 0;
lugares[i].estado = DESOCUPADO;
lugares[i].tipo = TIPO_MOTO;
lugares[i].horas = 0;
}
}
int main()
{
struct LugarEstacionamiento lugares[CANTIDAD_CARROS + CANTIDAD_MOTOS];
limpiarLugares(lugares);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment