View Code of Problem 43

#include<stdio.h>
#include<string.h>
int  main()
{
	char str[1000],ch[1000];
	gets(str);
	char c;
	int i,j=0;
	int len = strlen(str);
	for(i=0;i<len;i++)
	{
		if((str[i]>='a'&&str[i]<='z') || (str[i]>='A'&&str[i]<='Z'))
		{
			c = str[i];
			ch[j++] = c;
		}
	}
	for(i=0;ch[i]!='\0';i++)
		{
			printf("%c",ch[i]);
		}
		return 0;
 } 

Double click to view unformatted code.


Back to problem 43