I'm not finished with this code, but I am stuck on this one glitch. This is what I have so far, and it's not working. Please let me know if you have any ideas on how to make this work.
Code:
int main()
{
/*Please input an n value greater than zero. Otherwise, exit the program by entering a carriage return*/
printf("Please input an n value greater than zero. Otherwise, exit the program by entering a carriage return\n\n");
int summation = 0, x, y;
scanf("%d", y);
for (y == x; summation <= M_E && x <= 34; x++)
{
summation = 1 / x;
summation += summation;
}
printf("%12f\n\n", summation);
system("pause");
printf("Enter in a new n value to compute\n\n")
}
Thanks in advance