Code:
#include<stdio.h>
int main()
{
unsigned long long counter1 =18446744073709551615;
char output[8]={0,0,0,0,0,0,0,1};
FILE *fp;
fp=fopen("d:\\crypt.h", "w");
unsigned long long counter2 =counter1;
int counter3=0;
while (counter2 !=0)
{
if counter3==200;
{
if (counter2<=counter1)
{
fprintf(fp,"if (counter2<=STUCK);
fprintf(fp,"if counter2<=counter1%s\n",output);
(counter2=counter2-2);
(output+1);
printf("%s\n",output);
printf("%llu\n",counter2);
counter3++;
{
fprintf(fp,"if (counter2<=STUCK)
}
}}
return 0;
}
as you can see I am stuck.
I am trying to make it so that every time that counter3==200 it will output in the file an if statement, the part I am hung on is how to make it put out as if statement every 200 passes and contain the other if's in it and have it reset back to 0 after it reaches 200 and keep it going.
I also can't figure out why the output text file is showing "if counter2<=counter1" and that's all it shows over and over. How do I fix this? It is suppose to transpose all the odd numbers converting them into the char array and fprint them into the file to serve as a test condition.
As for C books I have been reading them, I've read three so far but still am having trouble with it.
Thanks