I have a while(TRUE) loop that I need to break...Only way I can think to do this is with a if then goto. I know that is poor programming. What is the best way to brake this loop?
I have a while(TRUE) loop that I need to break...Only way I can think to do this is with a if then goto. I know that is poor programming. What is the best way to brake this loop?
Thats clownin...lol, I guess I've been at it tooo long...just not thinking. Boy, I feel dumb as ....
thanks
Use goto!
>Use goto!
That was sarcasm right... right!?
it's ironic considerate rarity patron of love higher knowledge engulfs me...
there is nothing wrong with goto. Jeez
Depending on how heavy the loop is, you may need anywhere from 8 to 25 gallons of brake fluid. To break a loop, curl both ends around your hands and pull hard in opposite directions. For larger loops you may want to invest in a knife, chainsaw or intergalactic proton blaster, depending on your budget.
Code:#include <stdio.h> void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){ puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9 /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i] ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][ t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}