Created
September 6, 2019 18:11
-
-
Save parzibyte/745aa33e5e09dd809b29f309606d7702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Validar si carácter es una letra en C | |
https://parzibyte.me/blog | |
*/ | |
#include <stdio.h> | |
#include <ctype.h> | |
int main(void) { | |
char letra; | |
printf("Escribe un carácter:\n"); | |
scanf("%c", &letra); | |
if (isalpha(letra)) { | |
printf("Es una letra"); | |
} else { | |
printf("NO es una letra"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment