View Code of Problem 43

#include "stdio.h"
#include "string.h"

void main()
{
	char a[100],b[100];
	int i,j;
	int len;
	gets(a);
	len=strlen(a);

	for(i=0,j=0;i<len;i++)
	{	
		if((a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z'))
		{
			b[j]=a[i];
			j++;
		}
	}
	b[j]='\0';
	puts(b);
}

Double click to view unformatted code.


Back to problem 43