Trying to eliminate a goto: from Schaums C++ book
Want the same result in structure way...one way it says is to use flags..Code:double sum = 0.0; int x = 1; repeat: sum += 1.0 / x++; if (x <= N) goto repeat; printf("The sum of the first %d reciprocals is %lf\n", N, sum);
which I am not sure were to place...use a boolean flag...
Suggestions- where to put it...Code:#define TRUE 1 #define FALSE 0