View Code of Problem 43

#include <stdio.h>
#include <string.h>
int main()
{
	char str[100];
	char strstr[100];
	int i;
	scanf("%s",str);
	int n=strlen(str);
	int m=0;
	for(i=0,m=0;i<n;i++)
	{
		if((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z'))
		{
			strstr[m]=str[i];
			m++;
		}
	}
	for(i=0;i<m;i++)
	{
		printf("%c",strstr[i]);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 43