Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char str[150];
- int i, j;
- printf("Enter the string with digits\n");
- gets(str);
- for(i = 0; str[i] != '\0'; ++i)
- {
- while (!( (str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z') || str[i] == '\0') )
- {
- for(j = i; str[j] != '\0'; ++j)
- {
- str[j] = str[j+1];
- }
- str[j] = '\0';
- }
- }
- printf("The string after deleting the digits\n");
- puts(str);
- return 0;
- }
- //Happy Coding
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement