level 4
lpkiss没那种命
楼主
#include <stdio.h>
void fun( char *a )
{
int i=0;
char *p=a;
while(*p&&*p=='*')
{
a[i]=*p;
i++;
p++;
}
while(*p)
{
if(*p!='*')
{a[i]=*p;i++;}
p++;
}
a[i]='\0';
} main()
{ char s[81];void NONO ();
printf("Enter a string:\n");gets(s);
fun( s );
printf("The string after deleted:\n");puts(s);
NONO();
}
2012年03月12日 13点03分
1
void fun( char *a )
{
int i=0;
char *p=a;
while(*p&&*p=='*')
{
a[i]=*p;
i++;
p++;
}
while(*p)
{
if(*p!='*')
{a[i]=*p;i++;}
p++;
}
a[i]='\0';
} main()
{ char s[81];void NONO ();
printf("Enter a string:\n");gets(s);
fun( s );
printf("The string after deleted:\n");puts(s);
NONO();
}
