View Code of Problem 43

#include<stdio.h>
#include<string.h>
int main(){
	char str[90];
    char str1[90];
	int length,j;
	j=0;
	scanf("%s",str);
	length=strlen(str);
	//printf("%d",length);
	for(int i=0;i<=length;i++){
		if(str[i]>='a'&&str[i]<='z'){
			str1[j]=str[i];
			j++;
		}
	    else if(str[i]>='A'&&str[i]<='Z'){
			str1[j]=str[i];
			j++;
		}
	}
	printf("%s",str1);
}

Double click to view unformatted code.


Back to problem 43