add_sub_brainfuck_code by croyal

#include<stdio.h>
main(){
   int i=0;
   int s=0;
   char c;
   char r[500];
   r[0]='\0';
   c=getchar();
   while(c!=-1){
      while(i!=c){
         if(i<c){
            i++;
            r[s]='+';
            s++;
         } else if(i>c){
            i--;
            r[s]='-';
            s++;
         }
      }
      r[s]='.';
      r[s+1]='\0';
      s=0;
      printf("%s",r);
      c=getchar();
   }
}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page