View Code of Problem 43

#include <stdio.h>
#include <math.h>

int main(int argc, const char * argv[]) {
    char str[91];
    char letterStr[91];
    int j = 0;
    
    scanf("%s", &str);
    
    for(int i = 0; i < strlen(str); i++) {
        if((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z')) {
            letterStr[j++] = str[i];
        }
    }
    
    printf("%s\n", letterStr);
    return 0;
}

Double click to view unformatted code.


Back to problem 43