#include <stdio.h>
#include <string.h>
void del(char *ch)
{
int i,n=0;
for(i=0;ch[i]!="\0";i++)
{ if ((ch[i]>="A"&& ch[i]<="Z")||(ch[i]>="a" && ch[i]<="z"))
{ ch[n++]=ch[i];}
}
ch[n]="\0";
void main()
char ch[80];
int i,n,t;
printf("請輸入一個字串:");
gets(ch);
del(ch);
n=strlen(ch);
for(i=0;i<n/2;i++)
t=ch[i];ch[i]=ch[n-1-i];ch[n-1-i]=t;}
puts(ch);
#include <stdio.h>
#include <string.h>
void del(char *ch)
{
int i,n=0;
for(i=0;ch[i]!="\0";i++)
{ if ((ch[i]>="A"&& ch[i]<="Z")||(ch[i]>="a" && ch[i]<="z"))
{ ch[n++]=ch[i];}
}
ch[n]="\0";
}
void main()
{
char ch[80];
int i,n,t;
printf("請輸入一個字串:");
gets(ch);
del(ch);
n=strlen(ch);
for(i=0;i<n/2;i++)
{
t=ch[i];ch[i]=ch[n-1-i];ch[n-1-i]=t;}
puts(ch);
}