#include <stdio.h>
#include "functions.h"
#include <ctype.h>

int main (int argc, char *argv[]) {

	int wordCount;
	int sentenceCount;
	int sum;
	int avg;

	FILE *in, *out;

	in = fopen(argv[1], "r");

	out = fopen(argv[2], "w");

	swap_and_print(in, out);

	wordCount = word_count(in);
	fprintf(out, "Word Count: %d\n", wordCount);

	sentenceCount = sentence_count(in);
	fprintf(out, "Sentence Count: %d\n", sentenceCount);

	fclose(in);
	fclose(out);

	return 0;

}
