#include #include #include "order.h" #include "report.h" int main(int argc, char **argv) { int prices[64]; int n = 0; for (int i = 1; i < argc && n < 64; i++) prices[n++] = atoi(argv[i]); if (n == 0) { fprintf(stderr, "usage: shop PRICE_CENTS...\n"); return 2; } print_report(stdout, prices, n); /* exit status: 0 when compute_total is positive */ return compute_total(prices, n) > 0 ? 0 : 1; }