#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
void test_diagnosis_progress() {
float diagnosis_progress = 0.5;
srand(time(NULL));
for (int i = 0; i < 10; ++i) {
float fluctuation = (rand() % 7 - 3) / 100.0;
diagnosis_progress += fluctuation;
if (diagnosis_progress < 0) diagnosis_progress = 0;
if (diagnosis_progress > 1) diagnosis_progress = 1;
printf("Diagnosis Progress after iteration %d: %.2f\n", i + 1, diagnosis_progress);
}
}
int main() {
test_diagnosis_progress();
return 0;
}