程序的功能是将字符串中的数字字符删除后输出

来源:百度知道 编辑:UC知道 时间:2024/09/28 10:37:49
#include"stdio.h"
void delnum(char *s)
{int i,j;
for(i=0,j=0;*(s+i);i++)
if(____________________)
{*(s+j)=*(s+i);_________;}
_____________________;}
main()
{char t[50];
printf("\n please input a string:\n");
gets(t);
delnum(t);
printf("\n%s",t);
getch();
}
帮忙做下,完成程序

完整程序如下:

#include"stdio.h"
void delnum(char *s)
{int i,j;
for(i=0,j=0;*(s+i);i++)
if(*(s+i)<'0' || *(s+i)>'9')
{*(s+j)=*(s+i);j++;}
*(s+j)='\0';}

main()
{char t[50];
printf("\n please input a string:\n");
gets(t);
delnum(t);
printf("\n%s",t);
getch();
}

以上程序TURBOC调试通过,保证运行正确。