#include #include int main() { char opcode=getchar(); char i=0; while(!feof(stdin)) { i=0; switch( opcode ) { case '+': while(opcode == '+' && !feof(stdin)) { opcode=getchar(); i++; } printf("+%c", i); break; case '-': while(opcode == '-' && !feof(stdin)) { opcode=getchar(); i++; } printf("-%c", i); break; case '>': while(opcode == '>' && !feof(stdin)) { opcode=getchar(); i++; } printf(">%c", i); break; case '<': while(opcode == '<' && !feof(stdin)) { opcode=getchar(); i++; } printf("<%c", i); break; default: printf("%c", opcode); opcode=getchar(); break; } } }