View Code of Problem 43

#include<stdio.h>

int main()
{
    int i,j;
    char str[90],str1[90];
    gets(str);
    //scanf("%c",&str);
    //printf("%s",str);
    //while(str[i]!=' ')
    for(i=0,j=0;str[i]!='\0';i++)
    {
        if((str[i]>='A'&&str[i]<='Z')||(str[i]<='z'&&str[i]>='a'))
        {
            str1[j] = str[i];
            j++;
        }
    }
    for(i=0;i<j;i++)
        printf("%c",str1[i]);
    //for(i=0;;i++)
    //{

    //}
    return 0;
}

Double click to view unformatted code.


Back to problem 43