Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   simplified the CAESAR problem (http://www.go4expert.com/forums/simplified-caesar-t26023/)

jose_peeterson 10Jun2011 13:48

simplified the CAESAR problem
 
this if statement does not seem to work
please help me fix the bug.
Code:

k = 0;

for(i = 0;i < l;i++);
  {
  if( (ascii[i] == 32) || (i == (l - 1)) )
    {
                                          //  printf("%d\n",i);
     
      while( (k <= i) && ascii[k] >= 97 && ascii[k] <= 122)
      {
      ascii[k] = ascii[k] + 3;
     
      secret[k] = ascii[k];
     
      k = k + 1;
     
      }
    k = i + 1;
   
    }
       
  }



All times are GMT +5.5. The time now is 18:58.