horno_simulator/horno.c
2025-04-23 21:09:12 -03:00

26 lines
650 B
C

#include <stdio.h>
#include "horno.h"
void mostrarEmpanadas(Empanada horno[], int cantidad) {
int mostradas = 0;
for (int i = 0; i < cantidad; i++) {
if (horno[i].activa == 0) continue;
printf("Empanada %d: %s - %s (%d/%d)",
i + 1,
horno[i].relleno,
estadoToString(horno[i].estado),
horno[i].tiempo_actual,
horno[i].tiempo_coccion
);
if (horno[i].tiene_relleno == 0) printf(" [SIN RELLENO]");
printf("\n");
mostradas++;
}
if (mostradas == 0) {
printf("El horno está vacio!\n");
}
}