View Code of Problem 43

#include <stdio.h>
#include <string.h>
#include<iostream>
#include<cmath>
#include<cstdio>
#include <string>
using namespace std;
#pragma warning(disable:4996)

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

Double click to view unformatted code.


Back to problem 43