|
|
back to boardComp error Posted by nexerd 2 Oct 2014 19:44 while (n>0) { b=a; b=b/pow(10,n-1) - rezult/pow(10,n-1); for (int i=1;i<10;i++) if ((b-i>=0)&(b-i-1<0)) rezult += (i)*pow(10,n-1); n--; } /* if delete : b=b/pow(10,n-1) - rezult/pow(10,n-1); for (int i=1;i<10;i++) if ((b-i>=0)&(b-i-1<0)) rezult += (i)*pow(10,n-1); - work! */ Re: Comp error 1. Which programming language do you use? 2. Did you name the variable for result "rezult" (if there is need to pre-declare variables in yout PL)? |
|
|