#include #include #define BSIZE 100 #define PMAX 50 struct age65 { char pref[20]; int total; int over65; float ratio65; }; int compare_age65(const void *x, const void *y) { struct age65 *a = (struct age65 *)x; struct age65 *b = (struct age65 *)y; float epsilon = 0.00002; if (a->ratio65 - b->ratio65 > epsilon) return -1; else if (b->ratio65 - a->ratio65 > epsilon) return 1; else return 0; } output_csv(struct age65 x[], int n) { int i; for (i=0; i