#include #include #include typedef struct { char sensor[20]; float valor; char unidade[10]; } Medicao; Medicao* carregarMedicoes(const char* nome_arquivo, int* total) { // } void mostrarTodos(Medicao* lista, int total) { printf("--- TODAS AS MEDIÇÕES ---\n"); for (int i = 0; i < total; i++) { printf("%s (%s): %.1f\n", lista[i].sensor, lista[i].unidade, lista[i].valor); } } // buscar sensor // identificar criticos // buscar sensor max min int main() { char tipo[20]; float limite; int opcao; int total = 0; char arq[] = "medicoes.bin"; // caregar arquivo binario //mostrarTodos(lista, total); scanf("%d", &opcao); switch (opcao) { case 1: scanf("%s", tipo); buscarSensor(lista, total, tipo); break; case 2: scanf("%s", tipo); scanf("%f", &limite); identificarCriticos(lista, total, tipo, limite); break; case 3: scanf("%s", tipo); buscarSensorMaxMin(lista, total, tipo); break; default: printf("Opção inválida.\n"); } free(lista); }