#include <stdio.h>
#define MAXLINE 100
#define is_other 1
#define is_digital 2
//通过递归调用把整数转换成字符;
void printd(int n)
{
if (n < 0)
{
putchar('-');
n = - n ;
}
if (n > 0)
{
printd(n / 10);
putchar(n % 10 + '0');
}
}
void copy(char to[] , char from[])
{
int i;
i = 0;
while ((to[i]=from[i]) != '\0')
++i;
}
int main(void)
{
char getline[MAXLINE];
char done[MAXLINE];
int i , c , state , id;
i = 0;
while((c = getchar())!= '#')
{
getline[i++] = c;
if (getline[i] >= '0' && getline[i] <= '9')
{
state = is_digital;
id = getline[i];
printd(id);
}
else if((getline[i] >= 'A' && getline[i] <= 'Z') || (getline[i] >= 'a' && getline[i] <= 'z'))
{
state =is_other;
copy(done ,getline);
printf("%s",done);
}
}
return 0;
}
#define MAXLINE 100
#define is_other 1
#define is_digital 2
//通过递归调用把整数转换成字符;
void printd(int n)
{
if (n < 0)
{
putchar('-');
n = - n ;
}
if (n > 0)
{
printd(n / 10);
putchar(n % 10 + '0');
}
}
void copy(char to[] , char from[])
{
int i;
i = 0;
while ((to[i]=from[i]) != '\0')
++i;
}
int main(void)
{
char getline[MAXLINE];
char done[MAXLINE];
int i , c , state , id;
i = 0;
while((c = getchar())!= '#')
{
getline[i++] = c;
if (getline[i] >= '0' && getline[i] <= '9')
{
state = is_digital;
id = getline[i];
printd(id);
}
else if((getline[i] >= 'A' && getline[i] <= 'Z') || (getline[i] >= 'a' && getline[i] <= 'z'))
{
state =is_other;
copy(done ,getline);
printf("%s",done);
}
}
return 0;
}