- printf("%ld values (%ld booleans, %ld numbers, %ld strings)\n",
- total_values, total_b_values, total_n_values, total_s_values);
+#define PLURAL(n) n, (n != 1) ? "s" : ""
+ printf("%ld value%s (%ld boolean%s, %ld number%s, %ld string%s)\n",
+ PLURAL(total_values),
+ PLURAL(total_b_values),
+ PLURAL(total_n_values),
+ PLURAL(total_s_values));