Been hammering @ this for a few days now. The code works like a champ. I just need the results printed @ the specified loc(myOutput.txt). Unfortionaly this is giving me trouble, can someone help me a little and figure out where I went wrong:

include <stdio.h>
#include <conio.h>
#include <math.h>

void main(void)
{
char c;
int N,x,iter = 1;

FILE *outptr;
outptr=fopen("myOutput.txt","wt");
printf("\nPlease enter a value for N ");
scanf("%i",&N);
printf("\n ");
for(x = N, iter = 0; x > 1; x--)
{
printf("%i", x);
printf(" + ");
iter = iter + x;
fprintf(outptr, "%i", x);
fprintf(outptr, " + ");
}
printf(" 1 = ");
printf("%i", iter);
getch();
fclose(outptr);