Advertisement
aiNayan

6(v)

Nov 30th, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char ch[50];
  5. printf("Enter a string: ");
  6. gets(ch);
  7. int i;
  8. for (i = 0; ch[i] != '\0'; i++) {
  9. if ((ch[i] >= 'A' && ch[i] <= 'Z') || (ch[i] >= 'a' && ch[i] <= 'z'))
  10. printf("%c", ch[i]);
  11. }
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement