/*
 * Test program for product
 * Compile with: gcc -o product-test product.c product-test.c
 * Then run with: ./product-test integer_a integer_n
 */

#include <stdio.h>
#include <stdlib.h>

int product(int a, int n);

int main(int argc, char* argv[]) {
	if (argc > 2) {
		int a = atoi(argv[1]);
		int n = atoi(argv[2]);
		fprintf(stdout, "product(%d, %d) = %d\n", a, n, product(a, n));
	} else {
		fprintf(stderr, "# Usage: %s <int> <int>\n", argv[0]);
	}
	return 0;
}
