#include
#include
#include
#define M 10
/* run this program using the console pauser or add your own getch, system("pause") or input loop /
/*238-7.编写删除除在前导位置外的其他的‘’号的函数,不得使用C语言提供的字符串函数。*/
char fun(char s1)
{
char *s2,*s3,str2[M]={0},str3[M]={0};
s2=str2;
s3=str3;
int i,j,n=0;
while((s1++)!='*')
{
n++;
}
for(i=0;i<=n;i++)
{
str3[i]='*';
}
for(i=0,j=0;i>n&&*(s1+i)!='\0';i++)
{
if(*(s1+i)='*')
{
(s2+j)=(s1+i);
}
}
strcat(s3,s2);
return *s2;
}
int main(int argc, char *argv[])
{
char str[M]={0},*s1;
s1=str;
scanf("%[^\n]",str);
printf("%s",fun(s1));
return 0;
}