interruptz/sunrin_nefus — pull request #2 by eominsuk55 (2012-03-08 09:10:38+00:00)
Title: 1학년 4반 21번 엄민석

#include
using namespace std;

int main(void)
{
int Tape[100];
int* Head = Tape;
char String[100];

for( ; ; )
{
fgets(String, 100, stdin);

for(unsigned int i = 0 ; i < (strlen(String) - 1) ; i++)
{
switch(String[i])
{
case '>':
Head++;
break;
case '<':
Head--;
break;
case '!':
cout << *Head << endl;
break;
case '?':
cin >> *Head;
break;
case '+':
++*Head;
break;
case '-':
--*Head;
break;
case '*':
for(int i = 0 ; i < *Head ; i++)
cout << '*';
cout << endl;
break;
}
}
}
}