View Code of Problem 43

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;

int main() {
	char str[100];
	gets(str);
	int i;
	for(i=0; i<strlen(str); i++) {
		if(str[i]<='Z' && str[i]>='A') {
			printf("%c",str[i]);
		} else if(str[i]<='z' && str[i]>='a') {
			printf("%c",str[i]);
		}
	}
}

Double click to view unformatted code.


Back to problem 43