View Code of Problem 43

#include<stdio.h>
#include<string.h>

int main() {
	char s[90];
	gets(s);
	int i = 0, j = 0;
	while (s[i] != '\0') {
		if ((s[i] >= 'a'&& s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) {
			s[j] = s[i];
			i++;
			j++;
		}
		else {
			i++;
		}
	}
	s[j] = '\0';
	printf("%s\n", s);
	return 0;

}

Double click to view unformatted code.


Back to problem 43