View Code of Problem 43

#include<stdio.h>

#define STR_LEN 90 

int main()
{	
	int i,j=0;
	char str[STR_LEN+1];
	scanf("%s", str);
	for ( i = 0; str[i]!='\0'; i++)
	{
		if((str[i]<='z' && str[i]>='a')||(str[i]<='Z' && str[i]>='A'))
		{
			str[j++] = str[i];
		}
	}
	str[j++] = '\0';
	printf("%s\n", str);
	return 0;
} 

Double click to view unformatted code.


Back to problem 43